langchain/docs
Jeff Vestal 46e181aa8b
Allow ElasticsearchEmbeddings to create a connection with ES Client object (#5321)
This PR adds a new method `from_es_connection` to the
`ElasticsearchEmbeddings` class allowing users to use Elasticsearch
clusters outside of Elastic Cloud.

Users can create an Elasticsearch Client object and pass that to the new
function.
The returned object is identical to the one returned by calling
`from_credentials`

```
# Create Elasticsearch connection
es_connection = Elasticsearch(
    hosts=['https://es_cluster_url:port'], 
    basic_auth=('user', 'password')
)

# Instantiate ElasticsearchEmbeddings using es_connection
embeddings = ElasticsearchEmbeddings.from_es_connection(
  model_id,
  es_connection,
)
```

I also added examples to the elasticsearch jupyter notebook

Fixes # https://github.com/hwchase17/langchain/issues/5239

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-30 17:26:30 -07:00
..
_static docs: Big Mendable Improvements (#4964) 2023-05-19 15:31:48 -07:00
additional_resources docs: Deployments page moved into Ecosystem/ (#4949) 2023-05-21 21:18:22 -07:00
ecosystem Add Chainlit to deployment options (#5314) 2023-05-27 21:12:53 -07:00
getting_started docs: added link to LangChain Handbook (#5311) 2023-05-27 20:57:40 -07:00
integrations docs: cleaning (#5413) 2023-05-30 13:58:16 -07:00
modules Allow ElasticsearchEmbeddings to create a connection with ES Client object (#5321) 2023-05-30 17:26:30 -07:00
reference docs: compound ecosystem and integrations (#4870) 2023-05-18 09:29:57 -07:00
tracing Some notebook and client fixes (add retries, clean up docs, etc) (#4820) 2023-05-16 20:23:00 -07:00
use_cases Fixed typo: 'ouput' to 'output' in all documentation (#5272) 2023-05-25 19:18:31 -07:00
conf.py docs: Mendable Search integration (#2803) 2023-04-13 21:52:25 -07:00
dependents.md docs: added ecosystem/dependents page (#4941) 2023-05-18 13:11:08 -07:00
index.rst docs: Deployments page moved into Ecosystem/ (#4949) 2023-05-21 21:18:22 -07:00
integrations.rst docs: ecosystem/integrations update 1 (#5219) 2023-05-29 07:25:17 -07:00
make.bat
Makefile
reference.rst docs: Deployments page moved into Ecosystem/ (#4949) 2023-05-21 21:18:22 -07:00
requirements.txt