From 4bf2ab63adc62dbcdbcc26b395327f1446287bcd Mon Sep 17 00:00:00 2001 From: Concedo Date: Fri, 13 Sep 2024 11:23:53 +0800 Subject: [PATCH] added support for o1-mini and o1-preview --- index.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/index.html b/index.html index fbfd56a..beb9b68 100644 --- a/index.html +++ b/index.html @@ -12419,6 +12419,18 @@ oai_payload.logit_bias = submit_payload.params.logit_bias; } + let is_using_o1 = custom_oai_model.toLowerCase().startsWith("o1-mini") || custom_oai_model.toLowerCase().startsWith("o1-preview"); + if(is_using_o1) + { + //o1 does not support ANY customization + oai_payload = + { + //remove max tokens due to huge amount needed + //"max_completion_tokens": submit_payload.params.max_length, + "model": custom_oai_model + } + } + if (document.getElementById("useoaichatcompl").checked) { let mainoaibody = submit_payload.prompt; //can be string or array if(insertAIVisionImages.length>0) @@ -17687,6 +17699,8 @@ + +