* Complete a prompt using the AI SDK generateText.
(prompt: string)
| 198 | * Complete a prompt using the AI SDK generateText. |
| 199 | */ |
| 200 | async completePrompt(prompt: string): Promise<string> { |
| 201 | const languageModel = this.getLanguageModel() |
| 202 | |
| 203 | const { text } = await generateText({ |
| 204 | model: languageModel, |
| 205 | prompt, |
| 206 | maxOutputTokens: this.getMaxOutputTokens(), |
| 207 | temperature: this.config.temperature ?? 0, |
| 208 | }) |
| 209 | |
| 210 | return text |
| 211 | } |
| 212 | } |
nothing calls this directly
no test coverage detected