You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
chore: Fixes a few lint error for tools
PiperOrigin-RevId: 797945021
This commit is contained in:
committed by
Copybara-Service
parent
29bb75f975
commit
80d188199b
@@ -18,8 +18,6 @@ from typing import Any
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from google.genai import types
|
||||
from pydantic import BaseModel
|
||||
from pydantic import ConfigDict
|
||||
from pydantic import model_validator
|
||||
from typing_extensions import override
|
||||
|
||||
@@ -164,8 +162,8 @@ class AgentTool(BaseTool):
|
||||
tool_result = merged_text
|
||||
return tool_result
|
||||
|
||||
@classmethod
|
||||
@override
|
||||
@classmethod
|
||||
def from_config(
|
||||
cls, config: ToolArgsConfig, config_abs_path: str
|
||||
) -> AgentTool:
|
||||
|
||||
@@ -30,7 +30,6 @@ from typing import Union
|
||||
|
||||
from google.genai import types
|
||||
from pydantic import BaseModel
|
||||
from pydantic import ConfigDict
|
||||
|
||||
from ..utils.variant_utils import get_google_llm_variant
|
||||
from ..utils.variant_utils import GoogleLLMVariant
|
||||
@@ -40,6 +39,7 @@ logger = logging.getLogger("google_adk." + __name__)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.llm_request import LlmRequest
|
||||
from .tool_configs import ToolArgsConfig
|
||||
|
||||
SelfTool = TypeVar("SelfTool", bound="BaseTool")
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class GoogleLLMVariant(Enum):
|
||||
"""For using API Key from Google AI Studio"""
|
||||
|
||||
|
||||
def get_google_llm_variant() -> str:
|
||||
def get_google_llm_variant() -> GoogleLLMVariant:
|
||||
return (
|
||||
GoogleLLMVariant.VERTEX_AI
|
||||
if os.environ.get('GOOGLE_GENAI_USE_VERTEXAI', '0').lower()
|
||||
|
||||
Reference in New Issue
Block a user