Skip to content

Commit b236918

Browse files
committed
openai llm-api: Send all the responses in the first choice
1 parent 79ff661 commit b236918

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

web/src/llm-api/openai.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,5 +194,14 @@ export async function handleOpenAINonStream({
194194
logger,
195195
})
196196

197-
return data
197+
return {
198+
...data,
199+
choices: [
200+
{
201+
index: 0,
202+
message: { content: responseText, role: 'assistant' },
203+
finish_reason: 'stop',
204+
},
205+
],
206+
}
198207
}

0 commit comments

Comments
 (0)