This package provides an embedding function using the Alibaba Cloud DashScope Qwen Embeddings API. Qwen offers high-quality text embedding models that can convert text into dense vector representations, with support for both China and international region
npm install @seekdb/qwenThis package provides an embedding function using the Alibaba Cloud DashScope Qwen Embeddings API. Qwen offers high-quality text embedding models that can convert text into dense vector representations, with support for both China and international regions.
``bash`
npm install @seekdb/qwen
`typescript
import { QwenEmbeddingFunction } from "@seekdb/qwen";
const qwenEmbed = new QwenEmbeddingFunction({
modelName: "text-embedding-v4",
});
`
- apiKey: DashScope API key (optional, defaults to environment variable)
- apiKeyEnvVar: Environment variable name for the API key (default: 'DASHSCOPE_API_KEY')'text-embedding-v4'
- modelName: Model name to use (default: )1024
- dimensions: Embedding dimensions (default: )'cn'
- region: API region, either (China) or 'intl' (International) (default: 'cn'`)