Update error
This commit is contained in:
3
dist/index.js
generated
vendored
3
dist/index.js
generated
vendored
@@ -48695,8 +48695,7 @@ async function mcpInference(request, githubMcpClient) {
|
||||
try {
|
||||
const response = await client.chat.completions.create(chatCompletionRequest);
|
||||
if (!('choices' in response)) {
|
||||
coreExports.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;
|
||||
const modelResponse = assistantMessage?.content;
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -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