MCPcopy Create free account
hub / github.com/OpenAnonymity/oa-chat / embedText

Method embedText

embeddings/embeddingService.js:105–116  ·  view source on GitHub ↗
(text, options = {})

Source from the content-addressed store, hash-verified

103 }
104
105 async embedText(text, options = {}) {
106 const response = await this.createEmbedding({
107 model: options.model || this.model,
108 input: text
109 }, options);
110
111 const embedding = response.embeddings?.[0] || null;
112 if (!embedding) {
113 throw new Error('Embedding response did not include any vectors.');
114 }
115 return embedding;
116 }
117
118 async embedTexts(texts, options = {}) {
119 const response = await this.createEmbedding({

Callers 1

Calls 1

createEmbeddingMethod · 0.95

Tested by

no test coverage detected