From bc627808136274ebd064742ad5aa3a34dd076fd0 Mon Sep 17 00:00:00 2001 From: Luke Hollenback <8144622+lukehollenback@users.noreply.github.com> Date: Mon, 1 Apr 2024 18:48:27 -0600 Subject: [PATCH 1/3] Forced JSON mode on all GPT-4 Turbo models newer than the 1106 preview. In response to https://github.com/freeedcom/ai-codereviewer/issues/56. --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 13677ae4..106470cb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -127,7 +127,7 @@ async function getAIResponse(prompt: string): Promise Date: Mon, 1 Apr 2024 18:51:54 -0600 Subject: [PATCH 2/3] Forced JSON mode on newer GPT-3 Turbo models as well. As supported according to https://platform.openai.com/docs/guides/text-generation/json-mode. --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 106470cb..ed701c43 100644 --- a/src/main.ts +++ b/src/main.ts @@ -127,7 +127,7 @@ async function getAIResponse(prompt: string): Promise Date: Mon, 1 Apr 2024 18:55:27 -0600 Subject: [PATCH 3/3] Future-proofed change by added regular GPT-4 Turbo model reference. --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index ed701c43..af84f166 100644 --- a/src/main.ts +++ b/src/main.ts @@ -127,7 +127,7 @@ async function getAIResponse(prompt: string): Promise