@@ -75,8 +75,8 @@ describe("llama 3.2", () => {
7575 const chatSession1_1 = new LlamaChatSession ( {
7676 contextSequence : contextSequence1
7777 } ) ;
78- const res1_1 = await chatSession1_1 . prompt ( "What did I tell you to remember?" , { maxTokens : 12 } ) ;
79- expect ( res1_1 ) . to . toMatchInlineSnapshot ( "\"You didn't tell me to remember anything. This is the \"" ) ;
78+ const res1_1 = await chatSession1_1 . prompt ( "What did I tell you to remember?" , { maxTokens : 10 } ) ;
79+ expect ( res1_1 ) . to . toMatchInlineSnapshot ( "\"You didn't tell me to remember anything. This\"" ) ;
8080
8181 await contextSequence1 . clearHistory ( ) ;
8282 const contextSequence1TokensState2 = contextSequence1 . tokenMeter . getState ( ) ;
@@ -85,7 +85,7 @@ describe("llama 3.2", () => {
8585 expect ( TokenMeter . diff ( contextSequence1TokensState2 , contextSequence1TokensState1 ) ) . toMatchInlineSnapshot ( `
8686 {
8787 "usedInputTokens": 101,
88- "usedOutputTokens": 12 ,
88+ "usedOutputTokens": 10 ,
8989 }
9090 ` ) ;
9191
@@ -139,8 +139,8 @@ describe("llama 3.2", () => {
139139 contextSequence : contextSequence1
140140 } ) ;
141141
142- const res1 = await chatSession1 . prompt ( "Remember: locks are not doors" , { maxTokens : 6 } ) ;
143- expect ( res1 ) . to . toMatchInlineSnapshot ( "\"That's a clever phrase. \"" ) ;
142+ const res1 = await chatSession1 . prompt ( "Remember: locks are not doors" , { maxTokens : 4 } ) ;
143+ expect ( res1 ) . to . toMatchInlineSnapshot ( "\"That's a clever\"" ) ;
144144
145145
146146 const stateFile1Path = await getTempTestFilePath ( "state1" ) ;
@@ -150,12 +150,12 @@ describe("llama 3.2", () => {
150150 const contextSequence1TokensState = contextSequence1 . tokenMeter . getState ( ) ;
151151
152152 expect ( contextSequence1 . contextTokens ) . to . eql ( state1Tokens ) ;
153- expect ( contextSequence1 . contextTokens . length ) . toMatchInlineSnapshot ( "105 " ) ;
154- expect ( toBytes ( ( await fs . stat ( stateFile1Path ) ) . size ) ) . to . toMatchInlineSnapshot ( '"11.49MB "' ) ;
153+ expect ( contextSequence1 . contextTokens . length ) . toMatchInlineSnapshot ( "103 " ) ;
154+ expect ( toBytes ( ( await fs . stat ( stateFile1Path ) ) . size ) ) . to . toMatchInlineSnapshot ( '"11.27MB "' ) ;
155155 expect ( contextSequence1TokensState ) . to . toMatchInlineSnapshot ( `
156156 {
157157 "usedInputTokens": 99,
158- "usedOutputTokens": 6 ,
158+ "usedOutputTokens": 4 ,
159159 }
160160 ` ) ;
161161
@@ -200,8 +200,8 @@ describe("llama 3.2", () => {
200200 contextSequence : contextSequence1
201201 } ) ;
202202
203- const res1 = await chatSession1 . prompt ( "Remember: locks are not doors" , { maxTokens : 6 } ) ;
204- expect ( res1 ) . to . toMatchInlineSnapshot ( "\"That's a clever phrase. \"" ) ;
203+ const res1 = await chatSession1 . prompt ( "Remember: locks are not doors" , { maxTokens : 4 } ) ;
204+ expect ( res1 ) . to . toMatchInlineSnapshot ( "\"That's a clever\"" ) ;
205205
206206
207207 const stateFile1Path = await getTempTestFilePath ( "state1" ) ;
@@ -211,12 +211,12 @@ describe("llama 3.2", () => {
211211 const contextSequence1TokensState = contextSequence1 . tokenMeter . getState ( ) ;
212212
213213 expect ( contextSequence1 . contextTokens ) . to . eql ( state1Tokens ) ;
214- expect ( contextSequence1 . contextTokens . length ) . toMatchInlineSnapshot ( "105 " ) ;
215- expect ( toBytes ( ( await fs . stat ( stateFile1Path ) ) . size ) ) . to . toMatchInlineSnapshot ( '"11.49MB "' ) ;
214+ expect ( contextSequence1 . contextTokens . length ) . toMatchInlineSnapshot ( "103 " ) ;
215+ expect ( toBytes ( ( await fs . stat ( stateFile1Path ) ) . size ) ) . to . toMatchInlineSnapshot ( '"11.27MB "' ) ;
216216 expect ( contextSequence1TokensState ) . to . toMatchInlineSnapshot ( `
217217 {
218218 "usedInputTokens": 99,
219- "usedOutputTokens": 6 ,
219+ "usedOutputTokens": 4 ,
220220 }
221221 ` ) ;
222222
@@ -258,8 +258,8 @@ describe("llama 3.2", () => {
258258 contextSequence : contextSequence1
259259 } ) ;
260260
261- const res1 = await chatSession1 . prompt ( "Remember: locks are not doors" , { maxTokens : 6 } ) ;
262- expect ( res1 ) . to . toMatchInlineSnapshot ( "\"That's a clever phrase. \"" ) ;
261+ const res1 = await chatSession1 . prompt ( "Remember: locks are not doors" , { maxTokens : 4 } ) ;
262+ expect ( res1 ) . to . toMatchInlineSnapshot ( "\"That's a clever\"" ) ;
263263
264264
265265 const stateFile1Path = await getTempTestFilePath ( "state1" ) ;
@@ -269,12 +269,12 @@ describe("llama 3.2", () => {
269269 const contextSequence1TokensState = contextSequence1 . tokenMeter . getState ( ) ;
270270
271271 expect ( contextSequence1 . contextTokens ) . to . eql ( state1Tokens ) ;
272- expect ( contextSequence1 . contextTokens . length ) . toMatchInlineSnapshot ( "105 " ) ;
273- expect ( toBytes ( ( await fs . stat ( stateFile1Path ) ) . size ) ) . to . toMatchInlineSnapshot ( '"11.49MB "' ) ;
272+ expect ( contextSequence1 . contextTokens . length ) . toMatchInlineSnapshot ( "103 " ) ;
273+ expect ( toBytes ( ( await fs . stat ( stateFile1Path ) ) . size ) ) . to . toMatchInlineSnapshot ( '"11.27MB "' ) ;
274274 expect ( contextSequence1TokensState ) . to . toMatchInlineSnapshot ( `
275275 {
276276 "usedInputTokens": 99,
277- "usedOutputTokens": 6 ,
277+ "usedOutputTokens": 4 ,
278278 }
279279 ` ) ;
280280
0 commit comments