mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
ADK changes
PiperOrigin-RevId: 794403729
This commit is contained in:
committed by
Copybara-Service
parent
e2518dc371
commit
114db93d70
@@ -26,7 +26,6 @@ from google.adk.tools.function_tool import FunctionTool
|
||||
from google.adk.tools.tool_context import ToolContext
|
||||
from google.genai import types
|
||||
import pytest
|
||||
from typing_extensions import override
|
||||
|
||||
|
||||
def dummy_tool(query: str) -> str:
|
||||
@@ -179,10 +178,7 @@ class _MockTool(BaseTool):
|
||||
def __init__(self, name: str):
|
||||
super().__init__(name=name, description=f'Mock tool {name}')
|
||||
|
||||
@override
|
||||
def _get_declaration(
|
||||
self, ignore_return_declaration: bool = False
|
||||
) -> Optional[types.FunctionDeclaration]:
|
||||
def _get_declaration(self) -> Optional[types.FunctionDeclaration]:
|
||||
return types.FunctionDeclaration(
|
||||
name=self.name,
|
||||
description=self.description,
|
||||
|
||||
@@ -22,7 +22,6 @@ from google.adk.tools.base_tool import BaseTool
|
||||
from google.adk.tools.tool_context import ToolContext
|
||||
from google.genai import types
|
||||
import pytest
|
||||
from typing_extensions import override
|
||||
|
||||
|
||||
class _TestingTool(BaseTool):
|
||||
@@ -34,10 +33,7 @@ class _TestingTool(BaseTool):
|
||||
super().__init__(name='test_tool', description='test_description')
|
||||
self.declaration = declaration
|
||||
|
||||
@override
|
||||
def _get_declaration(
|
||||
self, ignore_return_declaration: bool = False
|
||||
) -> Optional[types.FunctionDeclaration]:
|
||||
def _get_declaration(self) -> Optional[types.FunctionDeclaration]:
|
||||
return self.declaration
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user