From b6155c8045ead49a34cdb07fe0752d891aac946e Mon Sep 17 00:00:00 2001 From: Aaron Batilo Date: Thu, 12 Sep 2024 14:36:14 -0600 Subject: [PATCH] Support OpenAI reasoning models These model strings are now available for use. More info: https://openai.com/index/introducing-openai-o1-preview/ https://platform.openai.com/docs/guides/reasoning --- completion.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/completion.go b/completion.go index 12ce4b558..e1e065a8b 100644 --- a/completion.go +++ b/completion.go @@ -17,6 +17,10 @@ var ( // GPT3 Models are designed for text-based tasks. For code-specific // tasks, please refer to the Codex series of models. const ( + O1Mini = "o1-mini" + O1Mini20240912 = "o1-mini-2024-09-12" + O1Preview = "o1-preview" + O1Preview20240912 = "o1-preview-2024-09-12" GPT432K0613 = "gpt-4-32k-0613" GPT432K0314 = "gpt-4-32k-0314" GPT432K = "gpt-4-32k" @@ -83,6 +87,10 @@ const ( var disabledModelsForEndpoints = map[string]map[string]bool{ "/completions": { + O1Mini: true, + O1Mini20240912: true, + O1Preview: true, + O1Preview20240912: true, GPT3Dot5Turbo: true, GPT3Dot5Turbo0301: true, GPT3Dot5Turbo0613: true,