Refactor MemoryComponent class and add ZepMessageReaderComponent (#1771)
* Add BaseMemoryComponent class to langflow.base.memory.memory.py (#1750) * Add BaseMemoryComponent class to langflow.base.memory.memory.py * Update MemoryComponent class in langflow.components.helpers.MemoryComponent.py to inherit from BaseMemoryComponent * ✨ (ZepMessageReader.py): Add ZepMessageReaderComponent to retrieve chat messages from Zep 📝 (ZepMessageWriter.py): Add ZepMessageWriterComponent to add messages to ZepChatMessageHistory 📝 (Langflow Memory Conversation.json): Refactor MemoryComponent class to inherit from BaseMemoryComponent for better code organization and reusability. Move get_messages method to the class level and validate kwargs for correct keys before processing. * Update WeaviateSearch.py to include index_name parameter in build method Update ZepMessageWriter.py to include metadata parameter in __init__ method Update ZepMessageReader.py to include cast function for memory parameter Update schema.py to include cast function for metadata parameter Update process.py to include tweaks_dict variable and use it in apply_tweaks method Update Weaviate.py to include index_name parameter in build method and raise ValueError if index_name is not provided * Update process.py to include tweaks_dict variable and use it in apply_tweaks method * ✨ (ZepMessageReader.py): Update ZepMessageReaderComponent build method to handle optional url and api_key parameters and improve error handling for zep-python package import 📝 (ZepMessageWriter.py): Refactor ZepMessageWriterComponent to use 'text' instead of 'message' for consistency and update add_message method to reflect this change. Add 'input_value' configuration option for specifying the record to write to Zep. Update build_config method to reflect changes in input parameters. Update add_message method to use 'text' parameter instead of 'message'. Update build method to handle optional url and api_key parameters and improve error handling for zep-python package import. * Update zep-python package to version 2.0.0rc5 * 📝 (memory.py): update parameter name from 'message' to 'text' for better clarity and consistency
This commit is contained in:
parent
ce322f1ba1
commit
19e46de04c
14 changed files with 345 additions and 47 deletions
|
|
@ -81,6 +81,7 @@ chromadb = "^0.4.24"
|
|||
langchain-anthropic = "^0.1.6"
|
||||
langchain-astradb = "^0.1.0"
|
||||
langchain-openai = "^0.1.1"
|
||||
zep-python = {version = "^2.0.0rc5", allow-prereleases = true}
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
types-redis = "^4.6.0.5"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue