interface BaiduQianfanEmbeddingsParams {
    modelName:
        | "tao-8k"
        | "Embedding-V1"
        | "bge-large-zh"
        | "bge-large-en";
    batchSize?: number;
    stripNewLines?: boolean;
    timeout?: number;
}

Hierarchy (view full)

  • Toolkit
    • BaiduQianfanEmbeddingsParams

Implemented by

Properties

modelName:
    | "tao-8k"
    | "Embedding-V1"
    | "bge-large-zh"
    | "bge-large-en"

Model name to use

batchSize?: number

The maximum number of characters allowed for embedding in a single request varies by model:

  • Embedding-V1 model: up to 1000 characters
  • bge-large-zh model: up to 2000 characters
  • bge-large-en model: up to 2000 characters
  • tao-8k model: up to 28000 characters

Note: These limits are model-specific and should be adhered to for optimal performance.

stripNewLines?: boolean

Whether to strip new lines from the input text.

timeout?: number

Timeout to use when making requests to BaiduQianfan.

""