(prompt: string)
| 139 | } |
| 140 | |
| 141 | async completePrompt(prompt: string): Promise<string> { |
| 142 | const { id } = this.getModel() |
| 143 | try { |
| 144 | const { text } = await generateText({ |
| 145 | model: this.poe(id), |
| 146 | prompt, |
| 147 | }) |
| 148 | return text |
| 149 | } catch (error) { |
| 150 | const errorMessage = error instanceof Error ? error.message : String(error) |
| 151 | TelemetryService.instance.captureException(new ApiProviderError(errorMessage, "poe", id, "completePrompt")) |
| 152 | throw new Error(`Poe completion error: ${errorMessage}`) |
| 153 | } |
| 154 | } |
| 155 | } |
nothing calls this directly
no test coverage detected