🚀 feat(constants.py): add BaseMemory to LANGCHAIN_BASE_TYPES to support custom memory implementation in Langchain interface

📝 WHY: The addition of BaseMemory to LANGCHAIN_BASE_TYPES allows for the customization of the memory component in the Langchain interface. This enables users to implement their own memory functionality according to their specific needs.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-08-09 21:11:00 -03:00
commit 2725e24ced

View file

@ -8,6 +8,7 @@ from langchain.text_splitter import TextSplitter
from langchain.tools import Tool
from langchain.vectorstores.base import VectorStore
from langchain.schema import BaseOutputParser
from langchain.schema.memory import BaseMemory
LANGCHAIN_BASE_TYPES = {
@ -22,6 +23,7 @@ LANGCHAIN_BASE_TYPES = {
"Embeddings": Embeddings,
"BaseRetriever": BaseRetriever,
"BaseOutputParser": BaseOutputParser,
"BaseMemory": BaseMemory,
}
# Langchain base types plus Python base types