mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix(config): Fixes SequentialAgent.config_type type hint
Without ClassVar, it will cause pydantic to generate warning. PiperOrigin-RevId: 795518646
This commit is contained in:
committed by
Copybara-Service
parent
a2832d5ac7
commit
8a9a271141
@@ -130,7 +130,7 @@ class LlmAgent(BaseAgent):
|
||||
When not set, the agent will inherit the model from its ancestor.
|
||||
"""
|
||||
|
||||
config_type: ClassVar[type[BaseAgentConfig]] = LlmAgentConfig
|
||||
config_type: ClassVar[Type[BaseAgentConfig]] = LlmAgentConfig
|
||||
"""The config type for this agent."""
|
||||
|
||||
instruction: Union[str, InstructionProvider] = ''
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import AsyncGenerator
|
||||
from typing import ClassVar
|
||||
from typing import Type
|
||||
|
||||
from typing_extensions import override
|
||||
@@ -33,7 +34,7 @@ from .sequential_agent_config import SequentialAgentConfig
|
||||
class SequentialAgent(BaseAgent):
|
||||
"""A shell agent that runs its sub-agents in sequence."""
|
||||
|
||||
config_type: Type[BaseAgentConfig] = SequentialAgentConfig
|
||||
config_type: ClassVar[Type[BaseAgentConfig]] = SequentialAgentConfig
|
||||
"""The config type for this agent."""
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user