mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-05-02 17:07:13 +00:00
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:
parent
288ff0d18c
commit
62cea07599
3 changed files with 27 additions and 14 deletions
frontend/src/components
LLMSelection/OpenAiOptions
Modals/MangeWorkspace/Settings/ChatModelPreference
server/utils/AiProviders/openAi
|
@ -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">
|
||||
|
|
|
@ -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: [],
|
||||
|
|
|
@ -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":
|
||||
|
@ -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",
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue