mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-08 22:21:23 +00:00
Address roomote feedback for better error handling
This commit is contained in:
parent
ea2408fa26
commit
1a8239cf08
1 changed files with 0 additions and 5 deletions
|
|
@ -167,13 +167,8 @@ export class WatsonxAIHandler extends BaseProvider implements SingleCompletionHa
|
|||
if (!response?.result?.choices?.[0]?.message?.content) {
|
||||
throw new Error("Invalid or empty response from IBM watsonx API")
|
||||
}
|
||||
|
||||
// Extract the message content directly
|
||||
return response.result.choices[0].message.content
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
throw new Error(`IBM watsonx completion error: ${error.message}`)
|
||||
}
|
||||
throw new Error(`IBM watsonx completion error: ${error.message}`)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue