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 2acf734 commit 30a6cc1Copy full SHA for 30a6cc1
src/api/generate.ts
@@ -58,8 +58,7 @@ export const chat_completion = async (
58
}
59
) => {
60
const completion = await openai.chat.completions.create(config)
61
- const result = completion.choices[0]?.message
62
- return { 'question': question, answer: result }
+ return { 'question': question, answer: completion.choices[0]?.message.content }
63
64
65
export const stream_completion = async (
0 commit comments