add gpt-3.5-turbo-1106 model for openai LLM (#636)

* add gpt-3.5-turbo-1106 model for openai LLM

* add gpt-3.5-turbo-1106 as valid model for backend and per workspace model selection
This commit is contained in:
Sean Hatfield 2024-01-22 13:19:47 -08:00 committed by GitHub
parent 288ff0d18c
commit 62cea07599
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 27 additions and 14 deletions

View File

@ -81,8 +81,13 @@ function OpenAIModelSelection({ apiKey, settings }) {
className="bg-zinc-900 border border-gray-500 text-white text-sm rounded-lg block w-full p-2.5" className="bg-zinc-900 border border-gray-500 text-white text-sm rounded-lg block w-full p-2.5"
> >
<optgroup label="General LLM models"> <optgroup label="General LLM models">
{["gpt-3.5-turbo", "gpt-4", "gpt-4-1106-preview", "gpt-4-32k"].map( {[
(model) => { "gpt-3.5-turbo",
"gpt-3.5-turbo-1106",
"gpt-4",
"gpt-4-1106-preview",
"gpt-4-32k",
].map((model) => {
return ( return (
<option <option
key={model} key={model}
@ -92,8 +97,7 @@ function OpenAIModelSelection({ apiKey, settings }) {
{model} {model}
</option> </option>
); );
} })}
)}
</optgroup> </optgroup>
{customModels.length > 0 && ( {customModels.length > 0 && (
<optgroup label="Your fine-tuned models"> <optgroup label="Your fine-tuned models">

View File

@ -4,7 +4,13 @@ import { useEffect, useState } from "react";
// Providers which cannot use this feature for workspace<>model selection // Providers which cannot use this feature for workspace<>model selection
export const DISABLED_PROVIDERS = ["azure", "lmstudio"]; export const DISABLED_PROVIDERS = ["azure", "lmstudio"];
const PROVIDER_DEFAULT_MODELS = { const PROVIDER_DEFAULT_MODELS = {
openai: ["gpt-3.5-turbo", "gpt-4", "gpt-4-1106-preview", "gpt-4-32k"], openai: [
"gpt-3.5-turbo",
"gpt-3.5-turbo-1106",
"gpt-4",
"gpt-4-1106-preview",
"gpt-4-32k",
],
gemini: ["gemini-pro"], gemini: ["gemini-pro"],
anthropic: ["claude-2", "claude-instant-1"], anthropic: ["claude-2", "claude-instant-1"],
azure: [], azure: [],

View File

@ -46,6 +46,8 @@ class OpenAiLLM {
switch (this.model) { switch (this.model) {
case "gpt-3.5-turbo": case "gpt-3.5-turbo":
return 4096; return 4096;
case "gpt-3.5-turbo-1106":
return 16385;
case "gpt-4": case "gpt-4":
return 8192; return 8192;
case "gpt-4-1106-preview": case "gpt-4-1106-preview":
@ -61,6 +63,7 @@ class OpenAiLLM {
const validModels = [ const validModels = [
"gpt-4", "gpt-4",
"gpt-3.5-turbo", "gpt-3.5-turbo",
"gpt-3.5-turbo-1106",
"gpt-4-1106-preview", "gpt-4-1106-preview",
"gpt-4-32k", "gpt-4-32k",
]; ];