Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switches to multilingual Elevenlabs #181

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add latest models
  • Loading branch information
jp-ipu committed Nov 11, 2023
commit b463f0407c7bacbdd242e86e10dfb10c0d220e96
13 changes: 8 additions & 5 deletions app/src/core/chat/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SSE from "../utils/sse";
import { OpenAIMessage, Parameters } from "./types";
import { backend } from "../backend";

export const defaultModel = 'gpt-3.5-turbo';
export const defaultModel = 'gpt-4-1106-preview';

export function isProxySupported() {
return !!backend.current?.services?.includes('openai');
Expand Down Expand Up @@ -140,14 +140,17 @@ export async function createStreamingChatCompletion(messages: OpenAIMessage[], p
}

export const maxTokensByModel = {
"gpt-3.5-turbo": 4096,
"gpt-4-1106-preview": 128000,
"gpt-4-vision-preview": 128000,
"gpt-4": 8192,
"gpt-4-0613": 8192,
"gpt-4-0314": 8192,
"gpt-4-0613": 8192,
"gpt-4-32k": 32768,
"gpt-4-32k-0613": 32768,
"gpt-4-32k-0314": 32768,
"gpt-3.5-turbo-16k": 16384,
"gpt-3.5-turbo": 4096,
"gpt-3.5-turbo-0613": 4096,
"gpt-3.5-turbo-16k-0613": 16384,
"gpt-3.5-turbo-1106": 16385,
"gpt-3.5-turbo-16k": 16385,
"gpt-3.5-turbo-16k-0613": 16385,
};
50 changes: 31 additions & 19 deletions app/src/global-options/parameters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,50 +23,62 @@ export const parameterOptions: OptionGroup = {
{
defaultMessage: "Note: This model will only work if your OpenAI account has been granted you have been given access to it. <a>Request access here.</a>",
},
{
a: (text: string) => <a href="https://openai.com/waitlist/gpt-4-api" target="_blank" rel="noreferer">{text}</a>
{
a: (text: string) => <a href="https://openai.com/waitlist/gpt-4-api" target="_blank" rel="noreferer">{text}</a>
} as any,
),
options: [
{
label: "GPT 3.5 Turbo (default)",
label: "GPT-3.5 Turbo",
value: "gpt-3.5-turbo",
},
{
label: "GPT 3.5 Turbo 16k",
label: "GPT-3.5 Turbo Snapshot (June 13, 2023)",
value: "gpt-3.5-turbo-0613",
},
{
label: "GPT-3.5 Turbo Snapshot (November 6, 2023) (default)",
value: "gpt-3.5-turbo-1106",
},
{
label: "GPT-3.5 Turbo 16k",
value: "gpt-3.5-turbo-16k",
},
{
label: "GPT 4",
value: "gpt-4",
label: "GPT-3.5 Turbo 16k Snapshot (June 13, 2023)",
value: "gpt-3.5-turbo-16k-0613",
},
{
label: "GPT 4 32k (requires invite)",
value: "gpt-4-32k",
label: "GPT-4 Snapshot (November 6, 2023)",
value: "gpt-4-1106-preview",
},
{
label: "GPT 4 Snapshot (June 13, 2023)",
value: "gpt-4-0613",
label: "GPT-4V (GPT-4 with Vision)",
value: "gpt-4-vision-preview",
},
{
label: "GPT 4 Snapshot (March 14, 2023)",
label: "GPT-4",
value: "gpt-4",
},
{
label: "GPT-4 Snapshot (March 14, 2023)",
value: "gpt-4-0314",
},
{
label: "GPT 4 32k June Snapshot (required invite)",
value: "gpt-4-32k-0613",
label: "GPT-4 Snapshot (June 13, 2023)",
value: "gpt-4-0613",
},
{
label: "GPT 4 32k March Snapshot (required invite)",
value: "gpt-4-32k-0314",
label: "GPT-4 32k (requires invite)",
value: "gpt-4-32k",
},
{
label: "GPT 3.5 Turbo Snapshot (June 13, 2023)",
value: "gpt-3.5-turbo-0613",
label: "GPT-4 32k June Snapshot (required invite)",
value: "gpt-4-32k-0613",
},
{
label: "GPT 3.5 Turbo 16k Snapshot (June 13, 2023)",
value: "gpt-3.5-turbo-16k-0613",
label: "GPT-4 32k March Snapshot (required invite)",
value: "gpt-4-32k-0314",
},
],
}),
Expand Down