Skip to content

Ai_Cf_Baai_Bge_Base_En_V1_5_Input

Ai_Cf_Baai_Bge_Base_En_V1_5_Input = { pooling?: "mean" | "cls"; text: string | string[]; } | { requests: object[]; }

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:4016

{ pooling?: "mean" | "cls"; text: string | string[]; }

optional pooling: "mean" | "cls"

The pooling method used in the embedding process. cls pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is mean in order for this to not be a breaking change, but we highly suggest using the new cls pooling for better accuracy.

text: string | string[]

{ requests: object[]; }

requests: object[]

Batch of the embeddings requests to run using async-queue