mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-17 07:26:16 +00:00
community: Use langchain-astradb for AstraDB caches (#18419)
- [x] Needs https://github.com/langchain-ai/langchain-datastax/pull/4 - [x] Needs a new release of langchain-astradb
This commit is contained in:
committed by
GitHub
parent
17c62e0f3a
commit
30e4a35d7a
@@ -56,7 +56,7 @@ See the [usage example](/docs/integrations/memory/astradb_chat_message_history#e
|
||||
|
||||
```python
|
||||
from langchain.globals import set_llm_cache
|
||||
from langchain_community.cache import AstraDBCache
|
||||
from langchain_astradb import AstraDBCache
|
||||
|
||||
set_llm_cache(AstraDBCache(
|
||||
api_endpoint=ASTRA_DB_API_ENDPOINT,
|
||||
@@ -71,7 +71,7 @@ Learn more in the [example notebook](/docs/integrations/llms/llm_caching#astra-d
|
||||
|
||||
```python
|
||||
from langchain.globals import set_llm_cache
|
||||
from langchain_community.cache import
|
||||
from langchain_astradb import AstraDBSemanticCache
|
||||
|
||||
set_llm_cache(AstraDBSemanticCache(
|
||||
embedding=my_embedding,
|
||||
|
Reference in New Issue
Block a user