Fixed types and created tests
This commit is contained in:
@@ -10,15 +10,15 @@ export class GrokProvider extends LLMProvider {
|
||||
this.model = config.model || 'grok-3';
|
||||
}
|
||||
|
||||
getConfigured() {
|
||||
get isConfigured() {
|
||||
return !!this.apiKey;
|
||||
}
|
||||
|
||||
async complete(systemPrompt, userMessage, opts = {}) {
|
||||
const res = await fetch('https://api.x.ai/v1/chat/completions', {
|
||||
method: POST,
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-type': 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${this.apiKey}`,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user