Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
ksyeo1010 committed Sep 20, 2024
1 parent 9adf1a3 commit 43d5063
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions binding/web/test/picollm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type DialogExpectations = {
"mistral-chat-dialog": string,
'phi2-chat-dialog': string,
'phi2-qa-dialog': string,
'phi3-dialog': string,
}

const sleep = async (ms: number) => {

Check warning on line 53 in binding/web/test/picollm.test.ts

View workflow job for this annotation

GitHub Actions / check-web-codestyle

Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`
Expand Down Expand Up @@ -530,13 +531,13 @@ describe('PicoLLM generate tests (worker)', () => {
generateTests();
});

describe('PicoLLM Dialog tests', () => {
describe.only('PicoLLM Dialog tests', () => {
it('should be able to get prompt', async () => {
const data = testData.dialog;
const conversation = data.conversation as [string, string][];
const prompts = data.prompts;

await runDialogTest(prompts, conversation);
await runDialogTest(prompts as DialogExpectations, conversation);
});

it('should be able to get prompt with system', async () => {
Expand All @@ -545,7 +546,7 @@ describe('PicoLLM Dialog tests', () => {
const system = data.system;
const prompts = data['prompts-with-system'];

await runDialogTest(prompts, conversation, {
await runDialogTest(prompts as DialogExpectations, conversation, {
system: system
});
});
Expand All @@ -555,7 +556,7 @@ describe('PicoLLM Dialog tests', () => {
const conversation = data.conversation as [string, string][];
const prompts = data['prompts-with-history'];

await runDialogTest(prompts, conversation, {
await runDialogTest(prompts as DialogExpectations, conversation, {
history: 0
});
});
Expand All @@ -566,7 +567,7 @@ describe('PicoLLM Dialog tests', () => {
const system = data.system;
const prompts = data['prompts-with-system-and-history'];

await runDialogTest(prompts, conversation, {
await runDialogTest(prompts as DialogExpectations, conversation, {
system: system,
history: 0
});
Expand Down

0 comments on commit 43d5063

Please sign in to comment.