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
# Licensed under the Apache License, Version 2.0 (the "License");
4
+
# you may not use this file except in compliance with the License.
5
+
# You may obtain a copy of the License at
6
+
#
7
+
# http://www.apache.org/licenses/LICENSE-2.0
8
+
#
9
+
# Unless required by applicable law or agreed to in writing, software
10
+
# distributed under the License is distributed on an "AS IS" BASIS,
11
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+
# See the License for the specific language governing permissions and
13
+
# limitations under the License.
14
+
fromuuidimportUUID
15
+
16
+
frompydanticimportBaseModel, Field
17
+
18
+
19
+
classMemory(BaseModel):
20
+
name: str=Field(
21
+
max_length=64, description="The name of the memory, which can be used to reference it in future queries."
22
+
)
23
+
text: str=Field(description="The content of the memory, which can be any text that the agent wants to remember.")
24
+
related_card_uuids: set[UUID] =Field(
25
+
default_factory=set,
26
+
max_length=10,
27
+
description="A list of UUIDs of cards that are related to this memory, which can be used to link the memory to specific cards and retrieve it later based on those cards. Up to 10 related card UUIDs can be included.",
28
+
)
29
+
30
+
31
+
classExistingMemory(Memory):
32
+
id: UUID=Field(
33
+
description="The unique identifier of the memory in the database, used for referencing and updating the memory."
34
+
)
35
+
created_at: str=Field(
36
+
description="The timestamp of when the memory was created in the database, used for tracking the age of the memory and determining if it may be obsolete or in need of consolidation with newer memories."
0 commit comments