参数类型默认值描述
wcd_urlOptional[str]NoneWeaviate Cloud Deployment 的 URL。如果未提供,则回退到 WCD_URL 环境变量。
wcd_api_keyOptional[str]NoneWeaviate Cloud Deployment 的 API 密钥。如果未提供,则回退到 WCD_API_KEY 环境变量。
clientOptional[weaviate.WeaviateClient]None预配置的 Weaviate 客户端实例。
localboolFalse是否使用本地 Weaviate 实例而不是云端。
collectionstr"default"要在 Weaviate 中使用的集合名称。
vector_indexVectorIndexVectorIndex.HNSW要使用的向量索引类型(HNSW、FLAT 或 DYNAMIC)。
distanceDistanceDistance.COSINE用于向量相似度的距离度量(COSINE、DOT 等)。
embedderOptional[Embedder]None用于生成向量嵌入的 Embedder。如果未提供,则默认为 OpenAIEmbedder。
search_typeSearchTypeSearchType.vector要执行的搜索类型(vector、keyword 或 hybrid)。
rerankerOptional[Reranker]None用于改进搜索结果的可选重排序器。
hybrid_search_alphafloat0.5混合搜索中向量搜索和关键词搜索之间的权重(0.0 = 仅关键词,1.0 = 仅向量)。