SiliconFlow
SiliconFlow is a cloud platform that hosts multiple open-source foundation models. Its embedding service offers semantic embedding models for RAG, search, recommendation, and similar workloads. Models such as the BGE series and Qwen Embedding series provide strong semantic representation; some (for example, Qwen3-Embedding) support configurable output dimensions. seekdb-js provides SiliconFlowEmbeddingFunction so you can generate SiliconFlow embeddings and use them with seekdb collections.
Using SiliconFlow service requires you to follow SiliconFlow's pricing rules and may incur corresponding fees. Before proceeding, please visit their official website or refer to relevant documentation to confirm and accept their pricing standards. If you do not agree, please do not proceed.
Dependencies and authentication
- Install the
@seekdb/siliconflowpackage. - Register on the SiliconFlow platform and create an API key in the API management section for authentication and billing.
Example: create a SiliconFlow embedding function
Call the SiliconFlowEmbeddingFunction constructor with a config object. Specify the model name; the function uses the default environment variable SILICONFLOW_API_KEY for the API key.
import { SiliconFlowEmbeddingFunction } from "@seekdb/siliconflow";
const ef = new SiliconFlowEmbeddingFunction({
modelName: "BAAI/bge-large-zh-v1.5",
});
Configurations:
- modelName: SiliconFlow embedding model name (default:
BAAI/bge-large-zh-v1.5). - api_key_env: Environment variable name for the API key (default:
SILICONFLOW_API_KEY).