chore(core): changed model to support json

This commit is contained in:
tabbi89 2024-07-04 11:29:25 +02:00
parent 823dc87f8d
commit 9d4daee5e0

View file

@ -129,7 +129,7 @@ async function getAIResponse(prompt: string): Promise<Array<{
const response = await openai.chat.completions.create({
...queryConfig,
// return JSON if the model supports it:
...(OPENAI_API_MODEL === "gpt-4o"
...(OPENAI_API_MODEL === "gpt-4-turbo"
? { response_format: { type: "json_object" } }
: {}),
messages: [