Skip to main content
Walkthrough of how to generate embeddings using a hosted embedding model in Elasticsearch The easiest way to instantiate the ElasticsearchEmbeddings class it either
  • using the from_credentials constructor if you are using Elastic Cloud
  • or using the from_es_connection constructor with any Elasticsearch cluster

Testing with from_credentials

This required an Elastic Cloud cloud_id

Testing with existing Elasticsearch client connection

This can be used with any Elasticsearch deployment