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();
4949const q3 = "What are the verbs in this sentence: 'The cat sat on the mat'" ;
5050console . 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
5354const 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 } ) ;
6566const parsedResponse = responseGrammar . parse ( a3 ) ;
6667console . log ( chalk . yellow ( "AI:" ) , parsedResponse . verbs ) ;
6768console . log ( ) ;
You can’t perform that action at this time.
0 commit comments