Skip to content

Commit 674beaa

Browse files
yeesiancopybara-github
authored andcommitted
fix: Fix the type annotation for content dictionaries in AdkApp
PiperOrigin-RevId: 756391356
1 parent 425b28b commit 674beaa

File tree

1 file changed

+2
-9
lines changed
  • vertexai/preview/reasoning_engines/templates

1 file changed

+2
-9
lines changed

vertexai/preview/reasoning_engines/templates/adk.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@
1717

1818

1919
if TYPE_CHECKING:
20-
try:
21-
from google.genai import types
22-
23-
ContentDict = types.Content
24-
except (ImportError, AttributeError):
25-
ContentDict = Dict
26-
2720
try:
2821
from google.adk.events.event import Event
2922

@@ -450,15 +443,15 @@ def set_up(self):
450443
def stream_query(
451444
self,
452445
*,
453-
message: Union[str, "ContentDict"],
446+
message: Union[str, Dict[str, Any]],
454447
user_id: str,
455448
session_id: Optional[str] = None,
456449
**kwargs,
457450
):
458451
"""Streams responses from the ADK application in response to a message.
459452
460453
Args:
461-
message (str):
454+
message (Union[str, Dict[str, Any]]):
462455
Required. The message to stream responses for.
463456
user_id (str):
464457
Required. The ID of the user.

0 commit comments

Comments
 (0)