8000 chore: Migrate json field names to camelCase (1/n) · codefromthecrypt/adk-python@f15f64a · GitHub
[go: up one dir, main page]

Skip to content

Commit f15f64a

Browse files
google-genai-botcopybara-github
authored andcommitted
chore: Migrate json field names to camelCase (1/n)
PiperOrigin-RevId: 757832114
1 parent 70a6bfa commit f15f64a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/google/adk/cli/fast_api.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@
4848
from opentelemetry.sdk.trace import export
4949
from opentelemetry.sdk.trace import ReadableSpan
5050
from opentelemetry.sdk.trace import TracerProvider
51+
from pydantic import alias_generators
5152
from pydantic import BaseModel
53+
from pydantic import ConfigDict
5254
from pydantic import ValidationError
5355
from starlette.types import Lifespan
5456

@@ -121,11 +123,20 @@ class AddSessionToEvalSetRequest(BaseModel):
121123

122124

123125
class RunEvalRequest(BaseModel):
126+
model_config = ConfigDict(
127+
alias_generator=alias_generators.to_camel,
128+
)
129+
124130
eval_ids: list[str] # if empty, then all evals in the eval set are run.
125131
eval_metrics: list[EvalMetric]
126132

127133

128134
class RunEvalResult(BaseModel):
135+
model_config = ConfigDict(
136+
alias_generator=alias_generators.to_camel,
137+
populate_by_name=True,
138+
)
139+
129140
eval_set_id: str
130141
eval_id: str
131142
final_eval_status: EvalStatus

0 commit comments

Comments
 (0)
0