Install and import from @langchain/baidu-qianfan instead.

interface BaiduQianfanEmbeddingsParams {
    modelName:
        | "embedding-v1"
        | "bge_large_zh"
        | "bge-large-en"
        | "tao-8k";
    batchSize?: number;
    stripNewLines?: boolean;
    timeout?: number;
}

Hierarchy (view full)

  • Toolkit
    • BaiduQianfanEmbeddingsParams

Implemented by

Properties

modelName:
    | "embedding-v1"
    | "bge_large_zh"
    | "bge-large-en"
    | "tao-8k"

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.