Skip to content

Commit 02805ee

Browse files
authored
test: fix tests (#509)
1 parent 142c91f commit 02805ee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/modelDependent/llama3.2/sequenceState.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ 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: 10});
78+
const res1_1 = await chatSession1_1.prompt("What's the exact thing I told you to remember?", {maxTokens: 10});
7979
expect(res1_1).to.toMatchInlineSnapshot("\"You didn't tell me to remember anything. This\"");
8080

8181
await contextSequence1.clearHistory();
@@ -84,7 +84,7 @@ describe("llama 3.2", () => {
8484
expect(contextSequence1.contextTokens).to.eql([]);
8585
expect(TokenMeter.diff(contextSequence1TokensState2, contextSequence1TokensState1)).toMatchInlineSnapshot(`
8686
{
87-
"usedInputTokens": 101,
87+
"usedInputTokens": 104,
8888
"usedOutputTokens": 10,
8989
}
9090
`);
@@ -105,15 +105,15 @@ describe("llama 3.2", () => {
105105
contextSequence: contextSequence1
106106
});
107107
chatSession1_2.setChatHistory(chatSession1.getChatHistory());
108-
const res1_2 = await chatSession1_2.prompt("What did I tell you to remember?", {maxTokens: 12});
108+
const res1_2 = await chatSession1_2.prompt("What's the exact thing I told you to remember?", {maxTokens: 12});
109109
const contextSequence1TokensState4 = contextSequence1.tokenMeter.getState();
110110

111-
expect(res1_2).to.toMatchInlineSnapshot('"You told me to remember that "locks are not doors"."');
111+
expect(res1_2).to.toMatchInlineSnapshot('"You told me to "Remember: locks are not doors"."');
112112
const contextSequence1TokensState4Diff = TokenMeter.diff(contextSequence1TokensState4, contextSequence1TokensState3);
113113
expect(contextSequence1TokensState4Diff.usedInputTokens).to.be.lessThan(contextSequence1TokensState1.usedInputTokens);
114114
expect(contextSequence1TokensState4Diff).toMatchInlineSnapshot(`
115115
{
116-
"usedInputTokens": 18,
116+
"usedInputTokens": 21,
117117
"usedOutputTokens": 12,
118118
}
119119
`);

0 commit comments

Comments
 (0)