MCPcopy Create free account
hub / github.com/MemTensor/MemOS / embedQuery

Method embedQuery

packages/memos-core/src/embedding/index.ts:42–48  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

40 }
41
42 async embedQuery(text: string): Promise<number[]> {
43 if (this.provider === "cohere" && this.cfg) {
44 return embedCohereQuery(text, this.cfg, this.log);
45 }
46 const vecs = await this.embedBatch([text]);
47 return vecs[0];
48 }
49
50 private async embedBatch(texts: string[]): Promise<number[][]> {
51 const provider = this.provider;

Callers 4

searchMethod · 0.45
searchSkillsMethod · 0.45
serveSearchMethod · 0.45
findRelatedSkillMethod · 0.45

Calls 2

embedBatchMethod · 0.95
embedCohereQueryFunction · 0.90

Tested by

no test coverage detected