Skip to content
Snippets Groups Projects
Commit 8b7a94f8 authored by Yi Ding's avatar Yi Ding
Browse files

fix

parent 44ab4d83
No related branches found
No related tags found
No related merge requests found
...@@ -62,12 +62,12 @@ export function mockLlmGeneration({ ...@@ -62,12 +62,12 @@ export function mockLlmGeneration({
} }
export function mockEmbeddingModel(embedModel: OpenAIEmbedding) { export function mockEmbeddingModel(embedModel: OpenAIEmbedding) {
jest.spyOn(embedModel, "aGetTextEmbedding").mockImplementation(async (x) => { jest.spyOn(embedModel, "getTextEmbedding").mockImplementation(async (x) => {
return new Promise((resolve) => { return new Promise((resolve) => {
resolve([1, 0, 0, 0, 0, 0]); resolve([1, 0, 0, 0, 0, 0]);
}); });
}); });
jest.spyOn(embedModel, "aGetQueryEmbedding").mockImplementation(async (x) => { jest.spyOn(embedModel, "getQueryEmbedding").mockImplementation(async (x) => {
return new Promise((resolve) => { return new Promise((resolve) => {
resolve([0, 1, 0, 0, 0, 0]); resolve([0, 1, 0, 0, 0, 0]);
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment