mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-16 04:02:55 -06:00
No public description
PiperOrigin-RevId: 749202950
This commit is contained in:
parent
daed456125
commit
6742ab9236
@ -23,7 +23,6 @@ from .readonly_context import ReadonlyContext
|
||||
if TYPE_CHECKING:
|
||||
from google.genai import types
|
||||
|
||||
from ..events.event import Event
|
||||
from ..events.event_actions import EventActions
|
||||
from ..sessions.state import State
|
||||
from .invocation_context import InvocationContext
|
||||
|
@ -310,7 +310,7 @@ async def _process_function_live_helper(
|
||||
function_response = {
|
||||
'status': f'No active streaming function named {function_name} found'
|
||||
}
|
||||
elif hasattr(tool, "func") and inspect.isasyncgenfunction(tool.func):
|
||||
elif inspect.isasyncgenfunction(tool.func):
|
||||
print('is async')
|
||||
|
||||
# for streaming tool use case
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
from typing import Any, Optional
|
||||
|
||||
from google.genai import types
|
||||
from pydantic import BaseModel
|
||||
@ -37,6 +37,7 @@ class LlmResponse(BaseModel):
|
||||
error_message: Error message if the response is an error.
|
||||
interrupted: Flag indicating that LLM was interrupted when generating the
|
||||
content. Usually it's due to user interruption during a bidi streaming.
|
||||
custom_metadata: The custom metadata of the LlmResponse.
|
||||
"""
|
||||
|
||||
model_config = ConfigDict(extra='forbid')
|
||||
@ -71,6 +72,14 @@ class LlmResponse(BaseModel):
|
||||
Usually it's due to user interruption during a bidi streaming.
|
||||
"""
|
||||
|
||||
custom_metadata: Optional[dict[str, Any]] = None
|
||||
"""The custom metadata of the LlmResponse.
|
||||
|
||||
An optional key-value pair to label an LlmResponse.
|
||||
|
||||
NOTE: the entire dict must be JSON serializable.
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def create(
|
||||
generate_content_response: types.GenerateContentResponse,
|
||||
|
Loading…
Reference in New Issue
Block a user