Skip to content
Snippets Groups Projects
Unverified Commit c4cb3778 authored by Marcus Schiesser's avatar Marcus Schiesser Committed by GitHub
Browse files

fix: use Array not Float32Array (#482)

parent b757d9a9
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ export class HuggingFaceEmbedding extends BaseEmbedding { ...@@ -39,7 +39,7 @@ export class HuggingFaceEmbedding extends BaseEmbedding {
async getTextEmbedding(text: string): Promise<number[]> { async getTextEmbedding(text: string): Promise<number[]> {
const extractor = await this.getExtractor(); const extractor = await this.getExtractor();
const output = await extractor(text, { pooling: "mean", normalize: true }); const output = await extractor(text, { pooling: "mean", normalize: true });
return output.data; return Array.from(output.data);
} }
async getQueryEmbedding(query: string): Promise<number[]> { async getQueryEmbedding(query: string): Promise<number[]> {
......
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