mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 14:43:07 +00:00
x
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from langchain_community.memory.entity import (
|
||||
RedisEntityStore,
|
||||
UpstashRedisEntityStore,
|
||||
SQLiteEntityStore,
|
||||
UpstashRedisEntityStore,
|
||||
)
|
||||
from langchain_community.memory.kg import ConversationKGMemory
|
||||
from langchain_community.memory.motorhead_memory import MotorheadMemory
|
||||
|
||||
@@ -2,9 +2,10 @@ import logging
|
||||
from itertools import islice
|
||||
from typing import Any, Iterable, Optional
|
||||
|
||||
from langchain_community.utilities.redis import get_client
|
||||
from langchain_core.legacy.memory.entity import BaseEntityStore
|
||||
|
||||
from langchain_community.utilities.redis import get_client
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -265,5 +266,3 @@ class SQLiteEntityStore(BaseEntityStore):
|
||||
"""
|
||||
with self.conn:
|
||||
self.conn.execute(query)
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
from typing import Any, Dict, List, Type, Union
|
||||
|
||||
from langchain_community.graphs import NetworkxEntityGraph
|
||||
from langchain_community.graphs.networkx_graph import (
|
||||
KnowledgeTriple,
|
||||
get_entities,
|
||||
parse_triples,
|
||||
)
|
||||
from langchain_core.language_models import BaseLanguageModel
|
||||
from langchain_core.legacy.chains.llm import LLMChain
|
||||
from langchain_core.legacy.memory.chat_memory import BaseChatMemory
|
||||
@@ -18,6 +12,13 @@ from langchain_core.messages import BaseMessage, SystemMessage, get_buffer_strin
|
||||
from langchain_core.prompts import BasePromptTemplate
|
||||
from langchain_core.pydantic_v1 import Field
|
||||
|
||||
from langchain_community.graphs import NetworkxEntityGraph
|
||||
from langchain_community.graphs.networkx_graph import (
|
||||
KnowledgeTriple,
|
||||
get_entities,
|
||||
parse_triples,
|
||||
)
|
||||
|
||||
|
||||
class ConversationKGMemory(BaseChatMemory):
|
||||
"""Knowledge graph conversation memory.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
import requests
|
||||
|
||||
from langchain_core.legacy.memory.chat_memory import BaseChatMemory
|
||||
from langchain_core.messages import get_buffer_string
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from langchain_community.chat_message_histories import ZepChatMessageHistory
|
||||
from langchain_core.legacy.memory import ConversationBufferMemory
|
||||
|
||||
from langchain_community.chat_message_histories import ZepChatMessageHistory
|
||||
|
||||
|
||||
class ZepMemory(ConversationBufferMemory):
|
||||
"""Persist your chain history to the Zep MemoryStore.
|
||||
|
||||
Reference in New Issue
Block a user