Skip to content

Commit 1291b97

Browse files
authored
fix(node template): bug (#342)
1 parent 106b171 commit 1291b97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

templates/node-typescript/src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ console.log();
4949
const q3 = "What are the verbs in this sentence: 'The cat sat on the mat'";
5050
console.log(chalk.yellow("User: ") + q3);
5151

52-
// force the model to respond in accordance to the specified JSON schema format, so we can parse it and use it programmatically
52+
// force the model to respond in accordance to the specified JSON schema format,
53+
// so we can parse it and use it programmatically
5354
const responseGrammar = await llama.createGrammarForJsonSchema({
5455
type: "object",
5556
properties: {
@@ -61,7 +62,7 @@ const responseGrammar = await llama.createGrammarForJsonSchema({
6162
}
6263
}
6364
});
64-
const a3 = await session.prompt(q2, {grammar: responseGrammar});
65+
const a3 = await session.prompt(q3, {grammar: responseGrammar});
6566
const parsedResponse = responseGrammar.parse(a3);
6667
console.log(chalk.yellow("AI:"), parsedResponse.verbs);
6768
console.log();

0 commit comments

Comments
 (0)