MCPcopy Index your code
hub / github.com/Effect-TS/effect / embed

Function embed

packages/ai/ai/src/EmbeddingModel.ts:233–243  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

231 )
232
233 const embed = (input: string) => {
234 const request = Effect.request(new EmbeddingRequest({ input }), resolver)
235 return Option.match(cache, {
236 onNone: () => request,
237 onSome: (cache) =>
238 request.pipe(
239 Effect.withRequestCaching(true),
240 Effect.withRequestCache(cache)
241 )
242 })
243 }
244
245 const embedMany = (inputs: ReadonlyArray<string>, options?: {
246 readonly concurrency?: Types.Concurrency | undefined

Callers 1

makeFunction · 0.85

Calls 2

requestMethod · 0.80
pipeMethod · 0.65

Tested by

no test coverage detected