mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-16 04:02:55 -06:00
chore: logger = logging.getLogger(__name__) --> logger = logging.getLogger('google_adk.' + __name__)
PiperOrigin-RevId: 759894901
This commit is contained in:
parent
482099c925
commit
0d7d7918b6
@ -53,7 +53,7 @@ from .callback_context import CallbackContext
|
|||||||
from .invocation_context import InvocationContext
|
from .invocation_context import InvocationContext
|
||||||
from .readonly_context import ReadonlyContext
|
from .readonly_context import ReadonlyContext
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
_SingleBeforeModelCallback: TypeAlias = Callable[
|
_SingleBeforeModelCallback: TypeAlias = Callable[
|
||||||
[CallbackContext, LlmRequest],
|
[CallbackContext, LlmRequest],
|
||||||
|
@ -22,7 +22,7 @@ from pydantic import BaseModel
|
|||||||
from pydantic import ConfigDict
|
from pydantic import ConfigDict
|
||||||
from pydantic import field_validator
|
from pydantic import field_validator
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
class StreamingMode(Enum):
|
class StreamingMode(Enum):
|
||||||
|
@ -23,7 +23,7 @@ from typing_extensions import override
|
|||||||
|
|
||||||
from .base_artifact_service import BaseArtifactService
|
from .base_artifact_service import BaseArtifactService
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
|
|
||||||
|
|
||||||
class GcsArtifactService(BaseArtifactService):
|
class GcsArtifactService(BaseArtifactService):
|
||||||
|
@ -24,7 +24,7 @@ from typing_extensions import override
|
|||||||
|
|
||||||
from .base_artifact_service import BaseArtifactService
|
from .base_artifact_service import BaseArtifactService
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
|
|
||||||
|
|
||||||
class InMemoryArtifactService(BaseArtifactService, BaseModel):
|
class InMemoryArtifactService(BaseArtifactService, BaseModel):
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
__all__ = []
|
__all__ = []
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ from .local_eval_sets_manager import convert_eval_set_to_pydanctic_schema
|
|||||||
from .response_evaluator import ResponseEvaluator
|
from .response_evaluator import ResponseEvaluator
|
||||||
from .trajectory_evaluator import TrajectoryEvaluator
|
from .trajectory_evaluator import TrajectoryEvaluator
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
|
|
||||||
|
|
||||||
# Constants for default runs and evaluation criteria
|
# Constants for default runs and evaluation criteria
|
||||||
|
@ -19,9 +19,11 @@ import re
|
|||||||
import time
|
import time
|
||||||
from typing import Any
|
from typing import Any
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from google.genai import types as genai_types
|
from google.genai import types as genai_types
|
||||||
from pydantic import ValidationError
|
from pydantic import ValidationError
|
||||||
from typing_extensions import override
|
from typing_extensions import override
|
||||||
|
|
||||||
from .eval_case import EvalCase
|
from .eval_case import EvalCase
|
||||||
from .eval_case import IntermediateData
|
from .eval_case import IntermediateData
|
||||||
from .eval_case import Invocation
|
from .eval_case import Invocation
|
||||||
@ -29,7 +31,7 @@ from .eval_case import SessionInput
|
|||||||
from .eval_set import EvalSet
|
from .eval_set import EvalSet
|
||||||
from .eval_sets_manager import EvalSetsManager
|
from .eval_sets_manager import EvalSetsManager
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
|
|
||||||
_EVAL_SET_FILE_EXTENSION = ".evalset.json"
|
_EVAL_SET_FILE_EXTENSION = ".evalset.json"
|
||||||
|
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
"""Utility functions for converting examples to a string that can be used in system instructions in the prompt."""
|
"""Utility functions for converting examples to a string that can be used in system instructions in the prompt."""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Optional, Union
|
from typing import Optional
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
from .base_example_provider import BaseExampleProvider
|
from .base_example_provider import BaseExampleProvider
|
||||||
from .example import Example
|
from .example import Example
|
||||||
@ -24,7 +25,7 @@ from .example import Example
|
|||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from ..sessions.session import Session
|
from ..sessions.session import Session
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
|
|
||||||
# Constant parts of the example string
|
# Constant parts of the example string
|
||||||
_EXAMPLES_INTRO = (
|
_EXAMPLES_INTRO = (
|
||||||
|
@ -48,7 +48,7 @@ if TYPE_CHECKING:
|
|||||||
from ._base_llm_processor import BaseLlmRequestProcessor
|
from ._base_llm_processor import BaseLlmRequestProcessor
|
||||||
from ._base_llm_processor import BaseLlmResponseProcessor
|
from ._base_llm_processor import BaseLlmResponseProcessor
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
class BaseLlmFlow(ABC):
|
class BaseLlmFlow(ABC):
|
||||||
|
@ -41,7 +41,7 @@ from ...tools.tool_context import ToolContext
|
|||||||
AF_FUNCTION_CALL_ID_PREFIX = 'adk-'
|
AF_FUNCTION_CALL_ID_PREFIX = 'adk-'
|
||||||
REQUEST_EUC_FUNCTION_CALL_NAME = 'adk_request_credential'
|
REQUEST_EUC_FUNCTION_CALL_NAME = 'adk_request_credential'
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
def generate_client_function_call_id() -> str:
|
def generate_client_function_call_id() -> str:
|
||||||
|
@ -25,7 +25,7 @@ from . import identity
|
|||||||
from . import instructions
|
from . import instructions
|
||||||
from .base_llm_flow import BaseLlmFlow
|
from .base_llm_flow import BaseLlmFlow
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
class SingleFlow(BaseLlmFlow):
|
class SingleFlow(BaseLlmFlow):
|
||||||
|
@ -16,7 +16,7 @@ import logging
|
|||||||
from .base_memory_service import BaseMemoryService
|
from .base_memory_service import BaseMemoryService
|
||||||
from .in_memory_memory_service import InMemoryMemoryService
|
from .in_memory_memory_service import InMemoryMemoryService
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'BaseMemoryService',
|
'BaseMemoryService',
|
||||||
|
@ -24,8 +24,9 @@ from typing import AsyncGenerator
|
|||||||
from typing import Generator
|
from typing import Generator
|
||||||
from typing import Iterable
|
from typing import Iterable
|
||||||
from typing import Literal
|
from typing import Literal
|
||||||
from typing import Optional, Union
|
from typing import Optional
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
from anthropic import AnthropicVertex
|
from anthropic import AnthropicVertex
|
||||||
from anthropic import NOT_GIVEN
|
from anthropic import NOT_GIVEN
|
||||||
@ -42,7 +43,7 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
__all__ = ["Claude"]
|
__all__ = ["Claude"]
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
|
|
||||||
MAX_TOKEN = 1024
|
MAX_TOKEN = 1024
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ from google.genai import types
|
|||||||
from .base_llm_connection import BaseLlmConnection
|
from .base_llm_connection import BaseLlmConnection
|
||||||
from .llm_response import LlmResponse
|
from .llm_response import LlmResponse
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
class GeminiLlmConnection(BaseLlmConnection):
|
class GeminiLlmConnection(BaseLlmConnection):
|
||||||
@ -149,16 +149,16 @@ class GeminiLlmConnection(BaseLlmConnection):
|
|||||||
message.server_content.input_transcription
|
message.server_content.input_transcription
|
||||||
and message.server_content.input_transcription.text
|
and message.server_content.input_transcription.text
|
||||||
):
|
):
|
||||||
user_text = message.server_content.input_transcription.text
|
user_text = message.server_content.input_transcription.text
|
||||||
parts = [
|
parts = [
|
||||||
types.Part.from_text(
|
types.Part.from_text(
|
||||||
text=user_text,
|
text=user_text,
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
llm_response = LlmResponse(
|
llm_response = LlmResponse(
|
||||||
content=types.Content(role='user', parts=parts)
|
content=types.Content(role='user', parts=parts)
|
||||||
)
|
)
|
||||||
yield llm_response
|
yield llm_response
|
||||||
if (
|
if (
|
||||||
message.server_content.output_transcription
|
message.server_content.output_transcription
|
||||||
and message.server_content.output_transcription.text
|
and message.server_content.output_transcription.text
|
||||||
|
@ -51,7 +51,7 @@ from .base_llm import BaseLlm
|
|||||||
from .llm_request import LlmRequest
|
from .llm_request import LlmRequest
|
||||||
from .llm_response import LlmResponse
|
from .llm_response import LlmResponse
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
|
|
||||||
_NEW_LINE = "\n"
|
_NEW_LINE = "\n"
|
||||||
_EXCLUDED_PART_FIELD = {"inline_data": {"data"}}
|
_EXCLUDED_PART_FIELD = {"inline_data": {"data"}}
|
||||||
|
@ -24,7 +24,7 @@ from typing import TYPE_CHECKING
|
|||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .base_llm import BaseLlm
|
from .base_llm import BaseLlm
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
_llm_registry_dict: dict[str, type[BaseLlm]] = {}
|
_llm_registry_dict: dict[str, type[BaseLlm]] = {}
|
||||||
|
@ -43,7 +43,7 @@ from .sessions.session import Session
|
|||||||
from .telemetry import tracer
|
from .telemetry import tracer
|
||||||
from .tools.built_in_code_execution_tool import built_in_code_execution
|
from .tools.built_in_code_execution_tool import built_in_code_execution
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
class Runner:
|
class Runner:
|
||||||
|
@ -19,7 +19,7 @@ from .session import Session
|
|||||||
from .state import State
|
from .state import State
|
||||||
from .vertex_ai_session_service import VertexAiSessionService
|
from .vertex_ai_session_service import VertexAiSessionService
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
@ -12,10 +12,12 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
import copy
|
import copy
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime
|
||||||
|
from datetime import timezone
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, Optional
|
from typing import Any
|
||||||
|
from typing import Optional
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from sqlalchemy import Boolean
|
from sqlalchemy import Boolean
|
||||||
@ -53,8 +55,7 @@ from .base_session_service import ListSessionsResponse
|
|||||||
from .session import Session
|
from .session import Session
|
||||||
from .state import State
|
from .state import State
|
||||||
|
|
||||||
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
DEFAULT_MAX_KEY_LENGTH = 128
|
DEFAULT_MAX_KEY_LENGTH = 128
|
||||||
DEFAULT_MAX_VARCHAR_LENGTH = 256
|
DEFAULT_MAX_VARCHAR_LENGTH = 256
|
||||||
|
@ -28,7 +28,7 @@ from .base_session_service import ListSessionsResponse
|
|||||||
from .session import Session
|
from .session import Session
|
||||||
from .state import State
|
from .state import State
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
class InMemorySessionService(BaseSessionService):
|
class InMemorySessionService(BaseSessionService):
|
||||||
@ -167,7 +167,7 @@ class InMemorySessionService(BaseSessionService):
|
|||||||
break
|
break
|
||||||
i -= 1
|
i -= 1
|
||||||
if i >= 0:
|
if i >= 0:
|
||||||
copied_session.events = copied_session.events[i + 1:]
|
copied_session.events = copied_session.events[i + 1 :]
|
||||||
|
|
||||||
return self._merge_state(app_name, user_id, copied_session)
|
return self._merge_state(app_name, user_id, copied_session)
|
||||||
|
|
||||||
|
@ -14,7 +14,8 @@
|
|||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
from typing import Any, Optional
|
from typing import Any
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from dateutil import parser
|
from dateutil import parser
|
||||||
from google import genai
|
from google import genai
|
||||||
@ -28,9 +29,8 @@ from .base_session_service import GetSessionConfig
|
|||||||
from .base_session_service import ListSessionsResponse
|
from .base_session_service import ListSessionsResponse
|
||||||
from .session import Session
|
from .session import Session
|
||||||
|
|
||||||
|
|
||||||
isoparse = parser.isoparse
|
isoparse = parser.isoparse
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
class VertexAiSessionService(BaseSessionService):
|
class VertexAiSessionService(BaseSessionService):
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import List, Optional, Union
|
from typing import List
|
||||||
|
from typing import Optional
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
from fastapi.openapi.models import HTTPBearer
|
from fastapi.openapi.models import HTTPBearer
|
||||||
from typing_extensions import override
|
from typing_extensions import override
|
||||||
@ -34,8 +36,7 @@ from .clients.connections_client import ConnectionsClient
|
|||||||
from .clients.integration_client import IntegrationClient
|
from .clients.integration_client import IntegrationClient
|
||||||
from .integration_connector_tool import IntegrationConnectorTool
|
from .integration_connector_tool import IntegrationConnectorTool
|
||||||
|
|
||||||
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
# TODO(cheliu): Apply a common toolset interface
|
# TODO(cheliu): Apply a common toolset interface
|
||||||
|
@ -13,7 +13,10 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, Dict, Optional, Union
|
from typing import Any
|
||||||
|
from typing import Dict
|
||||||
|
from typing import Optional
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
from google.genai.types import FunctionDeclaration
|
from google.genai.types import FunctionDeclaration
|
||||||
from typing_extensions import override
|
from typing_extensions import override
|
||||||
@ -26,8 +29,7 @@ from ..openapi_tool.openapi_spec_parser.rest_api_tool import to_gemini_schema
|
|||||||
from ..openapi_tool.openapi_spec_parser.tool_auth_handler import ToolAuthHandler
|
from ..openapi_tool.openapi_spec_parser.tool_auth_handler import ToolAuthHandler
|
||||||
from ..tool_context import ToolContext
|
from ..tool_context import ToolContext
|
||||||
|
|
||||||
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class IntegrationConnectorTool(BaseTool):
|
class IntegrationConnectorTool(BaseTool):
|
||||||
|
@ -24,11 +24,10 @@ from typing_extensions import override
|
|||||||
from .base_tool import BaseTool
|
from .base_tool import BaseTool
|
||||||
from .tool_context import ToolContext
|
from .tool_context import ToolContext
|
||||||
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from ..models import LlmRequest
|
from ..models import LlmRequest
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
@deprecated(
|
@deprecated(
|
||||||
|
@ -35,7 +35,7 @@ _py_builtin_type_to_schema_type = {
|
|||||||
dict: types.Type.OBJECT,
|
dict: types.Type.OBJECT,
|
||||||
}
|
}
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
def _is_builtin_primitive_or_compound(
|
def _is_builtin_primitive_or_compound(
|
||||||
|
@ -14,14 +14,15 @@
|
|||||||
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import List, Optional, Union
|
from typing import List
|
||||||
|
from typing import Optional
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
from google.adk.tools.base_toolset import ToolPredicate
|
from google.adk.tools.base_toolset import ToolPredicate
|
||||||
|
|
||||||
from .google_api_toolset import GoogleApiToolset
|
from .google_api_toolset import GoogleApiToolset
|
||||||
|
|
||||||
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class BigQueryToolset(GoogleApiToolset):
|
class BigQueryToolset(GoogleApiToolset):
|
||||||
|
@ -24,7 +24,7 @@ from googleapiclient.discovery import build
|
|||||||
from googleapiclient.errors import HttpError
|
from googleapiclient.errors import HttpError
|
||||||
|
|
||||||
# Configure logging
|
# Configure logging
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
|
|
||||||
|
|
||||||
class GoogleApiToOpenApiConverter:
|
class GoogleApiToOpenApiConverter:
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
__all__ = []
|
__all__ = []
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from .conversion_utils import adk_to_mcp_tool_type, gemini_to_json_schema
|
from .conversion_utils import adk_to_mcp_tool_type
|
||||||
|
from .conversion_utils import gemini_to_json_schema
|
||||||
from .mcp_tool import MCPTool
|
from .mcp_tool import MCPTool
|
||||||
from .mcp_toolset import MCPToolset
|
from .mcp_toolset import MCPToolset
|
||||||
|
|
||||||
@ -30,7 +31,7 @@ except ImportError as e:
|
|||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
if sys.version_info < (3, 10):
|
if sys.version_info < (3, 10):
|
||||||
logger.warning(
|
logger.warning(
|
||||||
|
@ -13,16 +13,21 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
from contextlib import AsyncExitStack, asynccontextmanager
|
from contextlib import asynccontextmanager
|
||||||
|
from contextlib import AsyncExitStack
|
||||||
import functools
|
import functools
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
from typing import Any, Optional, TextIO
|
from typing import Any
|
||||||
|
from typing import Optional
|
||||||
|
from typing import TextIO
|
||||||
|
|
||||||
import anyio
|
import anyio
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from mcp import ClientSession, StdioServerParameters
|
from mcp import ClientSession
|
||||||
|
from mcp import StdioServerParameters
|
||||||
from mcp.client.sse import sse_client
|
from mcp.client.sse import sse_client
|
||||||
from mcp.client.stdio import stdio_client
|
from mcp.client.stdio import stdio_client
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
@ -36,7 +41,7 @@ except ImportError as e:
|
|||||||
else:
|
else:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
class SseServerParams(BaseModel):
|
class SseServerParams(BaseModel):
|
||||||
|
@ -18,9 +18,10 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
import sys
|
import sys
|
||||||
from typing import List, Union
|
from typing import List
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from typing import TextIO
|
from typing import TextIO
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
from typing_extensions import override
|
from typing_extensions import override
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ except ImportError as e:
|
|||||||
|
|
||||||
from .mcp_tool import MCPTool
|
from .mcp_tool import MCPTool
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
|
|
||||||
|
|
||||||
class MCPToolset(BaseToolset):
|
class MCPToolset(BaseToolset):
|
||||||
|
@ -33,7 +33,7 @@ from ...base_toolset import ToolPredicate
|
|||||||
from .openapi_spec_parser import OpenApiSpecParser
|
from .openapi_spec_parser import OpenApiSpecParser
|
||||||
from .rest_api_tool import RestApiTool
|
from .rest_api_tool import RestApiTool
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
|
|
||||||
|
|
||||||
class OpenAPIToolset(BaseToolset):
|
class OpenAPIToolset(BaseToolset):
|
||||||
|
@ -30,7 +30,7 @@ from ..auth.credential_exchangers.auto_auth_credential_exchanger import AutoAuth
|
|||||||
from ..auth.credential_exchangers.base_credential_exchanger import AuthCredentialMissingError
|
from ..auth.credential_exchangers.base_credential_exchanger import AuthCredentialMissingError
|
||||||
from ..auth.credential_exchangers.base_credential_exchanger import BaseAuthCredentialExchanger
|
from ..auth.credential_exchangers.base_credential_exchanger import BaseAuthCredentialExchanger
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger("google_adk." + __name__)
|
||||||
|
|
||||||
AuthPreparationState = Literal["pending", "done"]
|
AuthPreparationState = Literal["pending", "done"]
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
logger.debug(
|
logger.debug(
|
||||||
'The Vertex sdk is not installed. If you want to use the Vertex RAG with'
|
'The Vertex sdk is not installed. If you want to use the Vertex RAG with'
|
||||||
' agents, please install it. If not, you can ignore this warning.'
|
' agents, please install it. If not, you can ignore this warning.'
|
||||||
|
@ -30,7 +30,7 @@ from .base_retrieval_tool import BaseRetrievalTool
|
|||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from ...models.llm_request import LlmRequest
|
from ...models.llm_request import LlmRequest
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('google_adk.' + __name__)
|
||||||
|
|
||||||
|
|
||||||
class VertexAiRagRetrieval(BaseRetrievalTool):
|
class VertexAiRagRetrieval(BaseRetrievalTool):
|
||||||
|
Loading…
Reference in New Issue
Block a user