Skip to content

Commit

Permalink
update test, fix dict
Browse files Browse the repository at this point in the history
  • Loading branch information
ksyeo1010 committed Oct 1, 2024
1 parent 1fbe706 commit 3ab33bb
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 53 deletions.
106 changes: 53 additions & 53 deletions binding/web/test/picollm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,56 +521,56 @@ describe('PicoLLM generate tests (worker)', () => {
generateTests();
});

// describe.only('PicoLLM Dialog tests', () => {
// it('should be able to get prompt', () => {
// const data = testData.dialog;
// const conversation = data.conversation as [string, string][];
// const prompts = data.prompts;
//
// cy.wrap(null).then(async () => {
// await runDialogTest(prompts, conversation);
// });
// });
//
// it('should be able to get prompt with system', () => {
// const data = testData.dialog;
// const conversation = data.conversation as [string, string][];
// const system = data.system;
// const prompts = data['prompts-with-system'];
//
//
// cy.wrap(null).then(async () => {
// await runDialogTest(prompts, conversation, {
// system: system
// });
// });
// });
//
// it('should be able to get prompt with history', () => {
// const data = testData.dialog;
// const conversation = data.conversation as [string, string][];
// const prompts = data['prompts-with-history'];
//
//
// cy.wrap(null).then(async () => {
// await runDialogTest(prompts, conversation, {
// history: 0
// });
// });
// });
//
// it('should be able to get prompt with system and history', () => {
// const data = testData.dialog;
// const conversation = data.conversation as [string, string][];
// const system = data.system;
// const prompts = data['prompts-with-system-and-history'];
//
//
// cy.wrap(null).then(async () => {
// await runDialogTest(prompts, conversation, {
// system: system,
// history: 0
// });
// });
// });
// });
describe('PicoLLM Dialog tests', () => {
it('should be able to get prompt', () => {
const data = testData.dialog;
const conversation = data.conversation as [string, string][];
const prompts = data.prompts;

cy.wrap(null).then(async () => {
await runDialogTest(prompts, conversation);
});
});

it('should be able to get prompt with system', () => {
const data = testData.dialog;
const conversation = data.conversation as [string, string][];
const system = data.system;
const prompts = data['prompts-with-system'];


cy.wrap(null).then(async () => {
await runDialogTest(prompts, conversation, {
system: system
});
});
});

it('should be able to get prompt with history', () => {
const data = testData.dialog;
const conversation = data.conversation as [string, string][];
const prompts = data['prompts-with-history'];


cy.wrap(null).then(async () => {
await runDialogTest(prompts, conversation, {
history: 0
});
});
});

it('should be able to get prompt with system and history', () => {
const data = testData.dialog;
const conversation = data.conversation as [string, string][];
const system = data.system;
const prompts = data['prompts-with-system-and-history'];


cy.wrap(null).then(async () => {
await runDialogTest(prompts, conversation, {
system: system,
history: 0
});
});
});
});
1 change: 1 addition & 0 deletions resources/.lint/spell-check/dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ Unmanaged
Unretained
Podfile
xcworkspace
webgpu

0 comments on commit 3ab33bb

Please sign in to comment.