Skip to content

Commit

Permalink
added support for o1-mini and o1-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
Concedo authored and Concedo committed Sep 13, 2024
1 parent a85da4d commit 4bf2ab6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -17687,6 +17699,8 @@
<option value="gpt-4-turbo">gpt-4-turbo</option>
<option value="gpt-4o">gpt-4o</option>
<option value="gpt-4-32k">gpt-4-32k</option>
<option value="o1-mini">o1-mini</option>
<option value="o1-preview">o1-preview</option>
<option style="display:none;" class="custom_model_option" value="custom">[Custom]</option>
</select>
<select style="padding:4px;display:inline;width:calc(100% - 220px)" class="form-control hidden" id="custom_openrouter_model" onchange="oai_model_change(true)">
Expand Down

0 comments on commit 4bf2ab6

Please sign in to comment.