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: allow "from google.adk.tools import AgentTool"
PiperOrigin-RevId: 784606041
This commit is contained in:
committed by
Copybara-Service
parent
3568c9291d
commit
5edc493da9
@@ -14,6 +14,7 @@
|
||||
|
||||
|
||||
from ..auth.auth_tool import AuthToolArguments
|
||||
from .agent_tool import AgentTool
|
||||
from .apihub_tool.apihub_toolset import APIHubToolset
|
||||
from .base_tool import BaseTool
|
||||
from .example_tool import ExampleTool
|
||||
@@ -31,6 +32,7 @@ from .url_context_tool import url_context
|
||||
from .vertex_ai_search_tool import VertexAiSearchTool
|
||||
|
||||
__all__ = [
|
||||
'AgentTool',
|
||||
'APIHubToolset',
|
||||
'AuthToolArguments',
|
||||
'BaseTool',
|
||||
|
||||
@@ -23,15 +23,12 @@ from typing_extensions import override
|
||||
|
||||
from . import _automatic_function_calling_util
|
||||
from ..memory.in_memory_memory_service import InMemoryMemoryService
|
||||
from ..runners import Runner
|
||||
from ..sessions.in_memory_session_service import InMemorySessionService
|
||||
from ._forwarding_artifact_service import ForwardingArtifactService
|
||||
from .base_tool import BaseTool
|
||||
from .tool_context import ToolContext
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..agents.base_agent import BaseAgent
|
||||
from ..agents.llm_agent import LlmAgent
|
||||
|
||||
|
||||
class AgentTool(BaseTool):
|
||||
@@ -103,6 +100,8 @@ class AgentTool(BaseTool):
|
||||
tool_context: ToolContext,
|
||||
) -> Any:
|
||||
from ..agents.llm_agent import LlmAgent
|
||||
from ..runners import Runner
|
||||
from ..sessions.in_memory_session_service import InMemorySessionService
|
||||
|
||||
if self.skip_summarization:
|
||||
tool_context.actions.skip_summarization = True
|
||||
|
||||
Reference in New Issue
Block a user