We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea2408f commit 1a8239cCopy full SHA for 1a8239c
src/api/providers/watsonx.ts
@@ -167,13 +167,8 @@ export class WatsonxAIHandler extends BaseProvider implements SingleCompletionHa
167
if (!response?.result?.choices?.[0]?.message?.content) {
168
throw new Error("Invalid or empty response from IBM watsonx API")
169
}
170
-
171
- // Extract the message content directly
172
return response.result.choices[0].message.content
173
} catch (error) {
174
- if (error instanceof Error) {
175
- throw new Error(`IBM watsonx completion error: ${error.message}`)
176
- }
177
throw new Error(`IBM watsonx completion error: ${error.message}`)
178
179
0 commit comments