diff --git a/package.json b/package.json index b8f19ed..f0d6db3 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/base/tokenizer/tokenizer.ts b/src/base/tokenizer/tokenizer.ts index a243029..9267159 100644 --- a/src/base/tokenizer/tokenizer.ts +++ b/src/base/tokenizer/tokenizer.ts @@ -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, }); }