mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-14 01:41:25 -06:00
chore: Migrate json field names to camelCase (2/n)
PiperOrigin-RevId: 757937550
This commit is contained in:
parent
05a0c6b307
commit
27b229719e
@ -76,6 +76,7 @@ from .cli_eval import EvalMetric
|
||||
from .cli_eval import EvalMetricResult
|
||||
from .cli_eval import EvalSetResult
|
||||
from .cli_eval import EvalStatus
|
||||
from .utils import common
|
||||
from .utils import create_empty_state
|
||||
from .utils import envs
|
||||
from .utils import evals
|
||||
@ -119,27 +120,18 @@ class AgentRunRequest(BaseModel):
|
||||
streaming: bool = False
|
||||
|
||||
|
||||
class AddSessionToEvalSetRequest(BaseModel):
|
||||
class AddSessionToEvalSetRequest(common.BaseModel):
|
||||
eval_id: str
|
||||
session_id: str
|
||||
user_id: str
|
||||
|
||||
|
||||
class RunEvalRequest(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
alias_generator=alias_generators.to_camel,
|
||||
)
|
||||
|
||||
class RunEvalRequest(common.BaseModel):
|
||||
eval_ids: list[str] # if empty, then all evals in the eval set are run.
|
||||
eval_metrics: list[EvalMetric]
|
||||
|
||||
|
||||
class RunEvalResult(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
alias_generator=alias_generators.to_camel,
|
||||
populate_by_name=True,
|
||||
)
|
||||
|
||||
class RunEvalResult(common.BaseModel):
|
||||
eval_set_file: str
|
||||
eval_set_id: str
|
||||
eval_id: str
|
||||
|
23
src/google/adk/cli/utils/common.py
Normal file
23
src/google/adk/cli/utils/common.py
Normal file
@ -0,0 +1,23 @@
|
||||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import pydantic
|
||||
from pydantic import alias_generators
|
||||
|
||||
|
||||
class BaseModel(pydantic.BaseModel):
|
||||
model_config = pydantic.ConfigDict(
|
||||
alias_generator=alias_generators.to_camel,
|
||||
populate_by_name=True,
|
||||
)
|
Loading…
Reference in New Issue
Block a user