Update error
This commit is contained in:
+1
-2
@@ -111,8 +111,7 @@ export async function mcpInference(
|
||||
const response = await client.chat.completions.create(chatCompletionRequest)
|
||||
|
||||
if (!('choices' in response)) {
|
||||
core.error('Unexpected response format from OpenAI API')
|
||||
return null
|
||||
throw new Error(`Unexpected response format from API: ${JSON.stringify(response)}`)
|
||||
}
|
||||
|
||||
const assistantMessage = response.choices[0]?.message
|
||||
|
||||
Reference in New Issue
Block a user