mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-14 09:51:25 -06:00
chore: Migrate json field names to camelCase (3/n)
PiperOrigin-RevId: 758394880
This commit is contained in:
parent
ff9de71869
commit
4def3f1bd3
@ -150,7 +150,7 @@ class InMemoryExporter(export.SpanExporter):
|
||||
self._spans.clear()
|
||||
|
||||
|
||||
class AgentRunRequest(BaseModel):
|
||||
class AgentRunRequest(common.BaseModel):
|
||||
app_name: str
|
||||
user_id: str
|
||||
session_id: str
|
||||
@ -179,6 +179,10 @@ class RunEvalResult(common.BaseModel):
|
||||
session_id: str
|
||||
|
||||
|
||||
class GetEventGraphResult(common.BaseModel):
|
||||
dot_src: str
|
||||
|
||||
|
||||
def get_fast_api_app(
|
||||
*,
|
||||
agent_dir: str,
|
||||
@ -804,7 +808,7 @@ def get_fast_api_app(
|
||||
root_agent, [(from_name, to_name)]
|
||||
)
|
||||
if dot_graph and isinstance(dot_graph, graphviz.Digraph):
|
||||
return {"dot_src": dot_graph.source}
|
||||
return GetEventGraphResult(dot_src=dot_graph.source)
|
||||
else:
|
||||
return {}
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
from typing import Any
|
||||
|
||||
from pydantic import alias_generators
|
||||
from pydantic import BaseModel
|
||||
from pydantic import ConfigDict
|
||||
from pydantic import Field
|
||||
@ -37,6 +38,8 @@ class Session(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
extra='forbid',
|
||||
arbitrary_types_allowed=True,
|
||||
alias_generator=alias_generators.to_camel,
|
||||
populate_by_name=True,
|
||||
)
|
||||
"""The pydantic model config."""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user