Skip to content

Commit

Permalink
Fix countMessageTokens (#123)
Browse files Browse the repository at this point in the history
* Fix

* Version bump
  • Loading branch information
roblourens authored Oct 22, 2024
1 parent 194a8c3 commit 071e399
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vscode/prompt-tsx",
"version": "0.3.0-alpha.9",
"version": "0.3.0-alpha.10",
"description": "Declare LLM prompts with TSX",
"main": "./dist/base/index.js",
"types": "./dist/base/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/base/tokenizer/tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class AnyTokenizer implements ITokenizer {
const vscode = require('vscode');
return this.countTokens({
role: this.toChatRole(message.role),
content: vscode.LanguageModelTextPart(message.content),
content: new vscode.LanguageModelTextPart(message.content),
name: 'name' in message ? message.name : undefined,
});
}
Expand Down

0 comments on commit 071e399

Please sign in to comment.