Skip to content

Commit

Permalink
Update src/base/index.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Connor Peet <connor@peet.io>
  • Loading branch information
justschen and connor4312 authored Jan 13, 2025
1 parent 46c1148 commit dc0580a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export async function renderPrompt<P extends BasePromptElementProps>(
: tokenizerMetadata;

if (tokenizer instanceof AnyTokenizer && mode !== 'vscode') {
throw new Error('Tokenizer must be an instance of AnyTokenizer when not in vscode mode.');
throw new Error('`mode` must be set to vscode when using vscode.LanguageModelChat as the tokenizer');
}
const renderer = new PromptRenderer(endpoint, ctor, props, tokenizer);
const renderResult = await renderer.render(progress, token);
Expand Down

0 comments on commit dc0580a

Please sign in to comment.