Skip to content

Commit

Permalink
fix #261: initiallize tiktoken from scheduled thread if not downloade…
Browse files Browse the repository at this point in the history
…d (during first use only)
  • Loading branch information
gptlang committed Jul 22, 2024
1 parent 92bc7b5 commit e195e53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/CopilotChat/tiktoken.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ local function load_tiktoken_data(done, model)
curl.get(tiktoken_url, {
output = cache_path,
})
done(cache_path)
end)
else
done(cache_path)
end

done(cache_path)
async:close()
end)
async:send()
Expand Down

0 comments on commit e195e53

Please sign in to comment.