Skip to content

Commit

Permalink
make tiktoken less dependent on model version/dates
Browse files Browse the repository at this point in the history
  • Loading branch information
gptlang committed Jul 26, 2024
1 parent 40e4ba0 commit 0f828f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/CopilotChat/tiktoken.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ end
local function load_tiktoken_data(done, model)
local tiktoken_url = 'https://openaipublic.blob.core.windows.net/encodings/cl100k_base.tiktoken'
-- If model is gpt-4o, use o200k_base.tiktoken
if model == 'gpt-4o-2024-05-13' then
if vim.startswith(model, 'gpt-4o') then
tiktoken_url = 'https://openaipublic.blob.core.windows.net/encodings/o200k_base.tiktoken'
end
local async
Expand Down

0 comments on commit 0f828f9

Please sign in to comment.