From 4ec40840045e5a3723300f3f50e093c1d9bce9a0 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Thu, 18 Jul 2024 21:17:44 -0700 Subject: [PATCH] Switch from GPT-3.5 to GPT-4o Mini --- .github/workflows/test-openai.yml | 2 +- ask-llm.clj | 2 +- ask-llm.js | 4 ++-- ask-llm.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-openai.yml b/.github/workflows/test-openai.yml index 313843e..de95eeb 100644 --- a/.github/workflows/test-openai.yml +++ b/.github/workflows/test-openai.yml @@ -21,7 +21,7 @@ jobs: env: LLM_API_BASE_URL: 'https://api.openai.com/v1' LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }} - LLM_CHAT_MODEL: 'gpt-3.5-turbo-0125' + LLM_CHAT_MODEL: 'gpt-4o-mini' LLM_STREAMING: 'no' - run: cat output.txt diff --git a/ask-llm.clj b/ask-llm.clj index 824434e..b114557 100755 --- a/ask-llm.clj +++ b/ask-llm.clj @@ -32,7 +32,7 @@ (defn chat [messages] (let [body {:messages messages - :model (or LLM-CHAT-MODEL "gpt-3.5-turbo") + :model (or LLM-CHAT-MODEL "gpt-4o-mini") :stop ["<|im_end|>" "<|end|>" "<|eot_id|>"] :max_tokens 200 :temperature 0} diff --git a/ask-llm.js b/ask-llm.js index dbb0897..8a4fa58 100755 --- a/ask-llm.js +++ b/ask-llm.js @@ -35,7 +35,7 @@ const LLM_DEBUG = process.env.LLM_DEBUG; const chat = async (messages, handler) => { const url = `${LLM_API_BASE_URL}/chat/completions`; const auth = LLM_API_KEY ? { 'Authorization': `Bearer ${LLM_API_KEY}` } : {}; - const model = LLM_CHAT_MODEL || 'gpt-3.5-turbo'; + const model = LLM_CHAT_MODEL || 'gpt-4o-mini'; const stop = ['<|im_end|>', '<|end|>', '<|eot_id|>']; const max_tokens = 200; const temperature = 0; @@ -149,4 +149,4 @@ const SYSTEM_PROMPT = 'Answer the question politely and concisely.'; } qa(); -})(); \ No newline at end of file +})(); diff --git a/ask-llm.py b/ask-llm.py index bbb0973..c5a17b9 100755 --- a/ask-llm.py +++ b/ask-llm.py @@ -24,7 +24,7 @@ async def chat(messages, handler=None): if auth_header: headers["Authorization"] = auth_header - model = LLM_CHAT_MODEL or "gpt-3.5-turbo" + model = LLM_CHAT_MODEL or "gpt-4o-mini" stop = ["<|im_end|>", "<|end|>", "<|eot_id|>"] max_tokens = 200 temperature = 0