Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const oaiEncodings = z.enum([

export const chatModels = z.enum([
"gpt-4o",
"gpt-4o-mini",
"gpt-3.5-turbo",
"gpt-4",
"gpt-4-32k",
Expand Down Expand Up @@ -125,6 +126,7 @@ export function isChatModel(
return (
model === "gpt-3.5-turbo" ||
model === "gpt-4o" ||
model === "gpt-4o-mini" ||
model === "gpt-4" ||
model === "gpt-4-1106-preview" ||
model === "gpt-4-32k"
Expand Down
2 changes: 1 addition & 1 deletion src/models/tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class TiktokenTokenizer implements Tokenizer {
"<|im_end|>": 100265,
"<|im_sep|>": 100266,
})
: model === "gpt-4o"
: model === "gpt-4o" || model === "gpt-4o-mini"
? get_encoding("o200k_base", {
"<|im_start|>": 200264,
"<|im_end|>": 200265,
Expand Down
2 changes: 2 additions & 0 deletions src/sections/ChatGPTEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function getChatGPTEncoding(
| "gpt-4-1106-preview"
| "gpt-4"
| "gpt-4o"
| "gpt-4o-mini"
| "gpt-4-32k"
) {
const isGpt3 = model === "gpt-3.5-turbo";
Expand All @@ -77,6 +78,7 @@ export function ChatGPTEditor(props: {
| "gpt-4-1106-preview"
| "gpt-4-32k"
| "gpt-4o"
| "gpt-4o-mini"
| "gpt-3.5-turbo";
onChange: (value: string) => void;
}) {
Expand Down