langchain/docs/modules
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
..
agents Add ToolException that a tool can throw. (#5050) 2023-05-29 20:05:58 +00:00
callbacks add more color to callbacks docs (#3856) 2023-04-30 19:13:01 -07:00
chains docs: cleaning (#5413) 2023-05-30 13:58:16 -07:00
indexes Add more code splitters (go, rst, js, java, cpp, scala, ruby, php, swift, rust) (#5171) 2023-05-30 11:04:05 -04:00
memory Sample Notebook for DynamoDB Chat Message History (#5351) 2023-05-27 21:16:24 -07:00
models Allow ElasticsearchEmbeddings to create a connection with ES Client object (#5321) 2023-05-30 17:26:30 -07:00
prompts Harrison/datetime parser (#4693) 2023-05-29 07:52:30 -07:00
utils/examples Pass parsed inputs through to tool _run (#4309) 2023-05-08 09:13:05 -07:00
agents.rst DOC: Misspelling in agents.rst documentation (#5038) 2023-05-20 22:24:08 -07:00
chains.rst
indexes.rst
memory.rst
models.rst Harrison/standard llm interface (#4615) 2023-05-13 09:05:31 -07:00
paul_graham_essay.txt Fix notebook example (#3142) 2023-04-19 08:55:06 -07:00
prompts.rst Harrison/prompt constructor methods (#4616) 2023-05-13 09:23:51 -07:00
state_of_the_union.txt