mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-21 14:18:52 +00:00
docs: fixes for Elasticsearch integrations, cache doc and providers list (#22817)
Some minor fixes in the documentation: - ElasticsearchCache initilization is now correct - List of integrations for ES updated
This commit is contained in:
parent
f9a6d5c845
commit
712aa0c529
@ -1710,14 +1710,12 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from elasticsearch import Elasticsearch\n",
|
||||
"from langchain.globals import set_llm_cache\n",
|
||||
"from langchain_elasticsearch import ElasticsearchCache\n",
|
||||
"\n",
|
||||
"es_client = Elasticsearch(hosts=\"http://localhost:9200\")\n",
|
||||
"set_llm_cache(\n",
|
||||
" ElasticsearchCache(\n",
|
||||
" es_connection=es_client,\n",
|
||||
" es_url=\"http://localhost:9200\",\n",
|
||||
" index_name=\"llm-chat-cache\",\n",
|
||||
" metadata={\"project\": \"my_chatgpt_project\"},\n",
|
||||
" )\n",
|
||||
@ -1761,7 +1759,6 @@
|
||||
"import json\n",
|
||||
"from typing import Any, Dict, List\n",
|
||||
"\n",
|
||||
"from elasticsearch import Elasticsearch\n",
|
||||
"from langchain.globals import set_llm_cache\n",
|
||||
"from langchain_core.caches import RETURN_VAL_TYPE\n",
|
||||
"from langchain_elasticsearch import ElasticsearchCache\n",
|
||||
@ -1792,9 +1789,10 @@
|
||||
" ]\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"es_client = Elasticsearch(hosts=\"http://localhost:9200\")\n",
|
||||
"set_llm_cache(\n",
|
||||
" SearchableElasticsearchCache(es_connection=es_client, index_name=\"llm-chat-cache\")\n",
|
||||
" SearchableElasticsearchCache(\n",
|
||||
" es_url=\"http://localhost:9200\", index_name=\"llm-chat-cache\"\n",
|
||||
" )\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
|
@ -32,7 +32,7 @@ pip install langchain-elasticsearch
|
||||
See a [usage example](/docs/integrations/text_embedding/elasticsearch).
|
||||
|
||||
```python
|
||||
from langchain_elasticsearch.embeddings import ElasticsearchEmbeddings
|
||||
from langchain_elasticsearch import ElasticsearchEmbeddings
|
||||
```
|
||||
|
||||
## Vector store
|
||||
@ -40,7 +40,7 @@ from langchain_elasticsearch.embeddings import ElasticsearchEmbeddings
|
||||
See a [usage example](/docs/integrations/vectorstores/elasticsearch).
|
||||
|
||||
```python
|
||||
from langchain_elasticsearch.vectorstores import ElasticsearchStore
|
||||
from langchain_elasticsearch import ElasticsearchStore
|
||||
```
|
||||
|
||||
|
||||
@ -49,5 +49,21 @@ from langchain_elasticsearch.vectorstores import ElasticsearchStore
|
||||
See a [usage example](/docs/integrations/memory/elasticsearch_chat_message_history).
|
||||
|
||||
```python
|
||||
from langchain_elasticsearch.chat_history import ElasticsearchChatMessageHistory
|
||||
from langchain_elasticsearch import ElasticsearchChatMessageHistory
|
||||
```
|
||||
|
||||
## LLM cache
|
||||
|
||||
See a [usage example](/docs/integrations/llm_caching/#elasticsearch-cache).
|
||||
|
||||
```python
|
||||
from langchain_elasticsearch import ElasticsearchCache
|
||||
```
|
||||
|
||||
## Byte Store
|
||||
|
||||
See a [usage example](/docs/integrations/stores/elasticsearch).
|
||||
|
||||
```python
|
||||
from langchain_elasticsearch import ElasticsearchEmbeddingsCache
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user