chore: Allows BaseAgent in the constructor of InMemoryRunner.

PiperOrigin-RevId: 759818175
This commit is contained in:
Wei Sun (Jack)
2025-05-16 17:42:22 -07:00
committed by Copybara-Service
parent 74b8841e62
commit 021aaddf32
2 changed files with 6 additions and 14 deletions

View File

@@ -23,7 +23,6 @@ from typing import Generator
from typing import Optional
import warnings
from deprecated import deprecated
from google.genai import types
from .agents.active_streaming_tool import ActiveStreamingTool
@@ -33,7 +32,6 @@ from .agents.invocation_context import new_invocation_context_id
from .agents.live_request_queue import LiveRequestQueue
from .agents.llm_agent import LlmAgent
from .agents.run_config import RunConfig
from .agents.run_config import StreamingMode
from .artifacts.base_artifact_service import BaseArtifactService
from .artifacts.in_memory_artifact_service import InMemoryArtifactService
from .events.event import Event
@@ -475,7 +473,7 @@ class InMemoryRunner(Runner):
session service for the runner.
"""
def __init__(self, agent: LlmAgent, *, app_name: str = 'InMemoryRunner'):
def __init__(self, agent: BaseAgent, *, app_name: str = 'InMemoryRunner'):
"""Initializes the InMemoryRunner.
Args: