-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
31 lines (25 loc) · 1.03 KB
/
Copy pathmodels.py
File metadata and controls
31 lines (25 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from pydantic import BaseModel
from typing import List, Dict, Any, Optional
class SearchInput(BaseModel):
# The search query string
query: str
# The ID of the user performing the search, defaults to DEFAULT_USER_ID
user_id: Optional[str] = None
# Optional ID of the agent associated with the search
agent_id: Optional[str] = None
class AddMemoryInput(BaseModel):
# A list of message dictionaries to be added as memories
messages: List[Dict[str, str]]
# The ID of the user associated with these memories
user_id: Optional[str] = None
# Optional ID of the agent associated with these memories
agent_id: Optional[str] = None
# Boolean indicating whether to infer additional memories from the input
infer: bool = True
# Optional metadata dictionary for the memories
metadata: Dict[str, Any] = {}
# Optional prompt to guide memory inference
prompt: Optional[str] = None
class GetAllMemoriesInput(BaseModel):
# The ID of the user whose memories are to be retrieved
user_id: str