Skip to content

Commit

Permalink
bug: fix wrong var used
Browse files Browse the repository at this point in the history
  • Loading branch information
chhoumann committed Nov 6, 2023
1 parent 6c0a6bd commit 80fe081
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ai/AIAssistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { getModelMaxTokens } from "./getModelMaxTokens";
export const getTokenCount = (text: string, model: Model) => {
// gpt-3.5-turbo-16k is a special case - it isn't in the library list yet. Same with gpt-4-1106-preview.
let m = model === "gpt-3.5-turbo-16k" ? "gpt-3.5-turbo" : model;
m = model === "gpt-4-1106-preview" ? "gpt-4" : model;
m = m === "gpt-4-1106-preview" ? "gpt-4" : m;

return encodingForModel(m).encode(text).length;
};
Expand Down

1 comment on commit 80fe081

@vercel
Copy link

@vercel vercel bot commented on 80fe081 Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

quickadd – ./

quickadd.obsidian.guide
quickadd-chrisbbh.vercel.app
quickadd-git-master-chrisbbh.vercel.app

Please sign in to comment.