You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/memory_module/config.py
+17
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,8 @@
3
3
4
4
frompydanticimportBaseModel, ConfigDict, Field
5
5
6
+
frommemory_module.interfaces.typesimportTopic
7
+
6
8
7
9
classLLMConfig(BaseModel):
8
10
"""Configuration for LLM service."""
@@ -16,6 +18,18 @@ class LLMConfig(BaseModel):
16
18
embedding_model: Optional[str] =None
17
19
18
20
21
+
DEFAULT_TOPICS= [
22
+
Topic(
23
+
name="General Interests and Preferences",
24
+
description="When a user mentions specific events or actions, focus on the underlying interests, hobbies, or preferences they reveal (e.g., if the user mentions attending a conference, focus on the topic of the conference, not the date or location).", # noqa: E501
25
+
),
26
+
Topic(
27
+
name="General Facts about the user",
28
+
description="Facts that describe relevant information about the user, such as details about where they live or things they own.", # noqa: E501
29
+
),
30
+
]
31
+
32
+
19
33
classMemoryModuleConfig(BaseModel):
20
34
"""Configuration for memory module components.
21
35
@@ -35,4 +49,7 @@ class MemoryModuleConfig(BaseModel):
35
49
description="Seconds to wait before processing a conversation",
36
50
)
37
51
llm: LLMConfig=Field(description="LLM service configuration")
52
+
topics: list[Topic] =Field(
53
+
default=DEFAULT_TOPICS, description="List of topics that the memory module should listen to", min_length=1
54
+
)
38
55
enable_logging: bool=Field(default=False, description="Enable verbose logging for memory module")
0 commit comments