Skip to content

Commit

Permalink
add gpt-3.5-turbo-1106 model for openai LLM (Mintplex-Labs#636)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
shatfield4 authored Jan 22, 2024
1 parent 288ff0d commit 62cea07
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
30 changes: 17 additions & 13 deletions frontend/src/components/LLMSelection/OpenAiOptions/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,23 @@ function OpenAIModelSelection({ apiKey, settings }) {
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">
{["gpt-3.5-turbo", "gpt-4", "gpt-4-1106-preview", "gpt-4-32k"].map(
(model) => {
return (
<option
key={model}
value={model}
selected={settings?.OpenAiModelPref === model}
>
{model}
</option>
);
}
)}
{[
"gpt-3.5-turbo",
"gpt-3.5-turbo-1106",
"gpt-4",
"gpt-4-1106-preview",
"gpt-4-32k",
].map((model) => {
return (
<option
key={model}
value={model}
selected={settings?.OpenAiModelPref === model}
>
{model}
</option>
);
})}
</optgroup>
{customModels.length > 0 && (
<optgroup label="Your fine-tuned models">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ import { useEffect, useState } from "react";
// Providers which cannot use this feature for workspace<>model selection
export const DISABLED_PROVIDERS = ["azure", "lmstudio"];
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"],
anthropic: ["claude-2", "claude-instant-1"],
azure: [],
Expand Down
3 changes: 3 additions & 0 deletions server/utils/AiProviders/openAi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class OpenAiLLM {
switch (this.model) {
case "gpt-3.5-turbo":
return 4096;
case "gpt-3.5-turbo-1106":
return 16385;
case "gpt-4":
return 8192;
case "gpt-4-1106-preview":
Expand All @@ -61,6 +63,7 @@ class OpenAiLLM {
const validModels = [
"gpt-4",
"gpt-3.5-turbo",
"gpt-3.5-turbo-1106",
"gpt-4-1106-preview",
"gpt-4-32k",
];
Expand Down

0 comments on commit 62cea07

Please sign in to comment.