Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix: add all tiktoken models (#2588)

Max Deichmann004107883043
diff --git a/worker/src/features/tokenisation/types.ts b/worker/src/features/tokenisation/types.ts
index cde5b88be2..29ae814068 100644
--- a/worker/src/features/tokenisation/types.ts
+++ b/worker/src/features/tokenisation/types.ts
@@ -34,24 +34,30 @@ export const isTiktokenModel = (model: string): model is TiktokenModel => {
"code-search-babbage-code-001",
"code-search-ada-code-001",
"gpt2",
- "gpt-4",
- "gpt-4-0314",
- "gpt-4-0613",
- "gpt-4-32k",
- "gpt-4-32k-0314",
- "gpt-4-32k-0613",
"gpt-3.5-turbo",
"gpt-35-turbo",
"gpt-3.5-turbo-0301",
"gpt-3.5-turbo-0613",
"gpt-3.5-turbo-1106",
+ "gpt-3.5-turbo-0125",
"gpt-3.5-turbo-16k",
"gpt-3.5-turbo-16k-0613",
+ "gpt-3.5-turbo-instruct",
+ "gpt-3.5-turbo-instruct-0914",
+ "gpt-4",
+ "gpt-4-0314",
+ "gpt-4-0613",
+ "gpt-4-32k",
+ "gpt-4-32k-0314",
+ "gpt-4-32k-0613",
+ "gpt-4-turbo",
+ "gpt-4-turbo-2024-04-09",
+ "gpt-4-turbo-preview",
"gpt-4-1106-preview",
+ "gpt-4-0125-preview",
"gpt-4-vision-preview",
- "gpt-4-turbo-2024-04-09",
- "gpt-4o-2024-05-13",
"gpt-4o",
+ "gpt-4o-2024-05-13",
].includes(model);
};
const chatModels = [