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

使用 from_credentials 进行测试

这需要一个 Elastic Cloud cloud_id

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

这可以用于任何 Elasticsearch 部署