File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ def clear(self):
150
150
self ._spans .clear ()
151
151
152
152
153
- class AgentRunRequest (BaseModel ):
153
+ class AgentRunRequest (common . BaseModel ):
154
154
app_name : str
155
155
user_id : str
156
156
session_id : str
@@ -179,6 +179,10 @@ class RunEvalResult(common.BaseModel):
179
179
session_id : str
180
180
181
181
182
+ class GetEventGraphResult (common .BaseModel ):
183
+ dot_src : str
184
+
185
+
182
186
def get_fast_api_app (
183
187
* ,
184
188
agent_dir : str ,
@@ -804,7 +808,7 @@ async def get_event_graph(
804
808
root_agent , [(from_name , to_name )]
805
809
)
806
810
if dot_graph and isinstance (dot_graph , graphviz .Digraph ):
807
- return { " dot_src" : dot_graph .source }
811
+ return GetEventGraphResult ( dot_src = dot_graph .source )
808
812
else :
809
813
return {}
810
814
Original file line number Diff line number Diff line change 14
14
15
15
from typing import Any
16
16
17
+ from pydantic import alias_generators
17
18
from pydantic import BaseModel
18
19
from pydantic import ConfigDict
19
20
from pydantic import Field
@@ -37,6 +38,8 @@ class Session(BaseModel):
37
38
model_config = ConfigDict (
38
39
extra = 'forbid' ,
39
40
arbitrary_types_allowed = True ,
41
+ alias_generator = alias_generators .to_camel ,
42
+ populate_by_name = True ,
40
43
)
41
44
"""The pydantic model config."""
42
45
You can’t perform that action at this time.
0 commit comments