mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
* fix: surfacing properly supported types by Mem0Storage * feat: prepare Mem0Storage to accept config paramenter We're planning to remove `memory_config` soon. This commit kindly prepare this storage to accept the config provided directly * feat: add external memory * fix: cleanup Mem0 warning while adding messages to the memory * feat: support set the current crew in memory This can be useful when a memory is initialized before the crew, but the crew might still be a very relevant attribute * fix: allow to reset only an external_memory from crew * test: add external memory test * test: ensure the config takes precedence over memory_config when setting mem0 * fix: support to provide a custom storage to External Memory * docs: add docs about external memory * chore: add warning messages about the deprecation of UserMemory * fix: fix typing check --------- Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
14 lines
301 B
Python
14 lines
301 B
Python
from typing import Any, Dict, Optional
|
|
|
|
|
|
class ExternalMemoryItem:
|
|
def __init__(
|
|
self,
|
|
value: Any,
|
|
metadata: Optional[Dict[str, Any]] = None,
|
|
agent: Optional[str] = None,
|
|
):
|
|
self.value = value
|
|
self.metadata = metadata
|
|
self.agent = agent
|