mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
ADK changes
PiperOrigin-RevId: 810492858
This commit is contained in:
committed by
Copybara-Service
parent
374522197f
commit
6ca2aee829
@@ -38,8 +38,6 @@ class _OutputSchemaRequestProcessor(BaseLlmRequestProcessor):
|
||||
from ...agents.llm_agent import LlmAgent
|
||||
|
||||
agent = invocation_context.agent
|
||||
if not isinstance(agent, LlmAgent):
|
||||
return
|
||||
|
||||
# Check if we need the processor: output_schema + tools
|
||||
if not agent.output_schema or not agent.tools:
|
||||
|
||||
@@ -410,8 +410,6 @@ class BaseLlmFlow(ABC):
|
||||
from ...agents.llm_agent import LlmAgent
|
||||
|
||||
agent = invocation_context.agent
|
||||
if not isinstance(agent, LlmAgent):
|
||||
return
|
||||
|
||||
# Runs processors.
|
||||
for processor in self.request_processors:
|
||||
@@ -760,8 +758,6 @@ class BaseLlmFlow(ABC):
|
||||
from ...agents.llm_agent import LlmAgent
|
||||
|
||||
agent = invocation_context.agent
|
||||
if not isinstance(agent, LlmAgent):
|
||||
return
|
||||
|
||||
callback_context = CallbackContext(
|
||||
invocation_context, event_actions=model_response_event.actions
|
||||
@@ -799,8 +795,6 @@ class BaseLlmFlow(ABC):
|
||||
from ...agents.llm_agent import LlmAgent
|
||||
|
||||
agent = invocation_context.agent
|
||||
if not isinstance(agent, LlmAgent):
|
||||
return
|
||||
|
||||
callback_context = CallbackContext(
|
||||
invocation_context, event_actions=model_response_event.actions
|
||||
|
||||
@@ -37,8 +37,6 @@ class _BasicLlmRequestProcessor(BaseLlmRequestProcessor):
|
||||
from ...agents.llm_agent import LlmAgent
|
||||
|
||||
agent = invocation_context.agent
|
||||
if not isinstance(agent, LlmAgent):
|
||||
return
|
||||
|
||||
llm_request.model = (
|
||||
agent.canonical_model
|
||||
|
||||
@@ -40,8 +40,6 @@ class _ContentLlmRequestProcessor(BaseLlmRequestProcessor):
|
||||
from ...agents.llm_agent import LlmAgent
|
||||
|
||||
agent = invocation_context.agent
|
||||
if not isinstance(agent, LlmAgent):
|
||||
return
|
||||
|
||||
if agent.include_contents == 'default':
|
||||
# Include full conversation history
|
||||
|
||||
@@ -215,8 +215,6 @@ async def handle_function_call_list_async(
|
||||
from ...agents.llm_agent import LlmAgent
|
||||
|
||||
agent = invocation_context.agent
|
||||
if not isinstance(agent, LlmAgent):
|
||||
return None
|
||||
|
||||
# Filter function calls
|
||||
filtered_calls = [
|
||||
|
||||
@@ -42,8 +42,6 @@ class _InstructionsLlmRequestProcessor(BaseLlmRequestProcessor):
|
||||
from ...agents.llm_agent import LlmAgent
|
||||
|
||||
agent = invocation_context.agent
|
||||
if not isinstance(agent, LlmAgent):
|
||||
return
|
||||
|
||||
root_agent: BaseAgent = agent.root_agent
|
||||
|
||||
|
||||
@@ -47,8 +47,7 @@ class _RequestConfirmationLlmRequestProcessor(BaseLlmRequestProcessor):
|
||||
from ...agents.llm_agent import LlmAgent
|
||||
|
||||
agent = invocation_context.agent
|
||||
if not isinstance(agent, LlmAgent):
|
||||
return
|
||||
|
||||
events = invocation_context.session.events
|
||||
if not events:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user