File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
templates/node-typescript/src Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ console.log();
49
49
const q3 = "What are the verbs in this sentence: 'The cat sat on the mat'" ;
50
50
console . log ( chalk . yellow ( "User: " ) + q3 ) ;
51
51
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
53
54
const responseGrammar = await llama . createGrammarForJsonSchema ( {
54
55
type : "object" ,
55
56
properties : {
@@ -61,7 +62,7 @@ const responseGrammar = await llama.createGrammarForJsonSchema({
61
62
}
62
63
}
63
64
} ) ;
64
- const a3 = await session . prompt ( q2 , { grammar : responseGrammar } ) ;
65
+ const a3 = await session . prompt ( q3 , { grammar : responseGrammar } ) ;
65
66
const parsedResponse = responseGrammar . parse ( a3 ) ;
66
67
console . log ( chalk . yellow ( "AI:" ) , parsedResponse . verbs ) ;
67
68
console . log ( ) ;
You can’t perform that action at this time.
0 commit comments