Skip to main content
使用 Elasticsearch 中的托管嵌入模型生成嵌入的步骤说明 实例化 ElasticsearchEmbeddings 类最简单的方法是
  • 如果您使用 Elastic Cloud,则使用 from_credentials 构造函数
  • 或者使用 from_es_connection 构造函数与任何 Elasticsearch 集群

使用 from_credentials 进行测试

这需要一个 Elastic Cloud cloud_id

使用现有的 Elasticsearch 客户端连接进行测试

这可以用于任何 Elasticsearch 部署

官方原文:src/oss/python/integrations/embeddings/elasticsearch.mdx · 非官方翻译,译文由 AI 生成,以英文原文为准。
Last modified on November 3, 2026