MCPcopy Create free account
hub / github.com/SkyworkAI/DeepResearchAgent / ChatEvent

Class ChatEvent

src/memory/types.py:20–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18 OPTIMIZATION_STEP = "optimization_step"
19
20class ChatEvent(BaseModel):
21 id: str = Field(..., description="The unique identifier for the event.")
22 step_number: int = Field(..., description="The step number of the event.")
23 event_type: EventType = Field(..., description="The type of the event.")
24 timestamp: datetime = Field(default_factory=datetime.now, description="The timestamp of the event.")
25 data: Dict[str, Any] = Field(default_factory=dict, description="The data of the event.")
26 agent_name: Optional[str] = Field(None, description="The name of the agent that generated the event.")
27 session_id: Optional[str] = Field(None, description="The session ID of the event.")
28 task_id: Optional[str] = Field(None, description="The task ID of the event.")
29
30 def __str__(self):
31 string = dedent(f"""<chat_event>
32 ID: {self.id}
33 Step Number: {self.step_number}
34 Event Type: {self.event_type}
35 Timestamp: {self.timestamp}
36 Agent Name: {self.agent_name}
37 Session ID: {self.session_id}
38 Task ID: {self.task_id}
39 Data: {json.dumps(self.data)}
40 </chat_event>""")
41 return string
42
43 def __repr__(self):
44 return self.__str__()
45
46class Importance(Enum):
47 HIGH = "high"

Callers 8

add_eventMethod · 0.90
load_from_jsonMethod · 0.90
add_eventMethod · 0.90
load_from_jsonMethod · 0.90
add_eventMethod · 0.90
load_from_jsonMethod · 0.90
add_eventMethod · 0.90
load_from_jsonMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected