mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-04-21 01:56:47 +00:00
Merge pull request #1 from jdriscoll98/jdriscoll98/always-support-json-mode
Update main.ts
This commit is contained in:
commit
4dc001ac8f
1 changed files with 1 additions and 3 deletions
|
@ -127,9 +127,7 @@ async function getAIResponse(prompt: string): Promise<Array<{
|
||||||
const response = await openai.chat.completions.create({
|
const response = await openai.chat.completions.create({
|
||||||
...queryConfig,
|
...queryConfig,
|
||||||
// return JSON if the model supports it:
|
// return JSON if the model supports it:
|
||||||
...(OPENAI_API_MODEL === "gpt-4-1106-preview"
|
response_format: { type: "json_object" },
|
||||||
? { response_format: { type: "json_object" } }
|
|
||||||
: {}),
|
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
role: "system",
|
role: "system",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue