(prompt: string)
| 328 | } |
| 329 | |
| 330 | async completePrompt(prompt: string): Promise<string> { |
| 331 | await this.ensureAuthenticated() |
| 332 | const client = this.ensureClient() |
| 333 | const model = this.getModel() |
| 334 | |
| 335 | const requestOptions: OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming = { |
| 336 | model: model.id, |
| 337 | messages: [{ role: "user", content: prompt }], |
| 338 | max_completion_tokens: model.info.maxTokens, |
| 339 | } |
| 340 | |
| 341 | const response = await this.callApiWithRetry(() => client.chat.completions.create(requestOptions)) |
| 342 | |
| 343 | return response.choices[0]?.message.content || "" |
| 344 | } |
| 345 | } |
nothing calls this directly
no test coverage detected