🚀 feat(constants.py): import BaseChatMemory from langchain.memory.chat_memory module to add support for chat memory in custom interfaces

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-08-09 21:49:20 -03:00
commit 1dcdc02e4f

View file

@ -9,7 +9,7 @@ from langchain.tools import Tool
from langchain.vectorstores.base import VectorStore
from langchain.schema import BaseOutputParser
from langchain.schema.memory import BaseMemory
from langchain.memory.chat_memory import BaseChatMemory
LANGCHAIN_BASE_TYPES = {
"Chain": Chain,
@ -24,6 +24,7 @@ LANGCHAIN_BASE_TYPES = {
"BaseRetriever": BaseRetriever,
"BaseOutputParser": BaseOutputParser,
"BaseMemory": BaseMemory,
"BaseChatMemory": BaseChatMemory,
}
# Langchain base types plus Python base types