mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2026-02-04 13:56:24 -06:00
chore: Migrate json field names to camelCase (4/4)
PiperOrigin-RevId: 758423361
This commit is contained in:
committed by
Copybara-Service
parent
931fb338f8
commit
d6cf660506
@@ -15,13 +15,18 @@
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from pydantic import alias_generators
|
||||
from pydantic import BaseModel
|
||||
from pydantic import ConfigDict
|
||||
from pydantic import Field
|
||||
|
||||
|
||||
class BaseModelWithConfig(BaseModel):
|
||||
model_config = ConfigDict(extra="allow")
|
||||
model_config = ConfigDict(
|
||||
extra="allow",
|
||||
alias_generator=alias_generators.to_camel,
|
||||
populate_by_name=True,
|
||||
)
|
||||
"""The pydantic model config."""
|
||||
|
||||
|
||||
|
||||
@@ -12,13 +12,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from .auth_credential import AuthCredential
|
||||
from .auth_credential import BaseModelWithConfig
|
||||
from .auth_schemes import AuthScheme
|
||||
|
||||
|
||||
class AuthConfig(BaseModel):
|
||||
class AuthConfig(BaseModelWithConfig):
|
||||
"""The auth config sent by tool asking client to collect auth credentials and
|
||||
|
||||
adk and client will help to fill in the response
|
||||
@@ -45,7 +44,7 @@ class AuthConfig(BaseModel):
|
||||
this field"""
|
||||
|
||||
|
||||
class AuthToolArguments(BaseModel):
|
||||
class AuthToolArguments(BaseModelWithConfig):
|
||||
"""the arguments for the special long running function tool that is used to
|
||||
|
||||
request end user credentials.
|
||||
|
||||
Reference in New Issue
Block a user