MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / callProviderEmbed

Function callProviderEmbed

src/core/embeddings.ts:136–141  ·  view source on GitHub ↗
(input: string[], signal: AbortSignal)

Source from the content-addressed store, hash-verified

134}
135
136async function callProviderEmbed(input: string[], signal: AbortSignal): Promise<number[][]> {
137 if (EMBED_PROVIDER === "openai") {
138 return callOpenAIEmbed(input, signal);
139 }
140 return callOllamaEmbed(input, signal);
141}
142
143function toIntegerOr(value: string | undefined, fallback: number): number {
144 if (!value) return fallback;

Callers 2

embedSingleAdaptiveFunction · 0.85
embedBatchAdaptiveFunction · 0.85

Calls 2

callOpenAIEmbedFunction · 0.85
callOllamaEmbedFunction · 0.85

Tested by

no test coverage detected