Undocumented
| Class | |
Input for invoke_model_streaming. |
| Async Function | invoke |
Activity that invokes an LLM model. |
| Async Function | invoke |
Streaming-aware model activity. |
| Function | _with |
Return the request with a response_schema that can be serialized. |
Activity that invokes an LLM model.
| Parameters | |
llmLlmRequest | The LLM request containing model name and parameters. |
| Returns | |
list[ | List of LLM responses from the model. |
| Raises | |
ValueError | If model name is not provided or LLM creation fails. |
Streaming-aware model activity.
Warning
Streaming support is experimental and may change in future versions.
Calls the LLM with stream=True and returns the collected list of raw LlmResponse chunks. The workflow's TemporalModel.generate_content_async yields these to the caller.
Each response is also published to the workflow's stream on streaming_topic so external consumers (UIs, tracing, etc.) can observe responses as they arrive.
Return the request with a response_schema that can be serialized.
ADK stores an agent's output_schema on the request as a Python type (for example a Pydantic model class), which the payload converter cannot serialize. google-genai and ADK's LiteLlm both turn such a type into its JSON schema before calling the model, so sending the JSON schema instead is equivalent. Pydantic model classes use their model_json_schema method to preserve custom schema generation. Integer-valued enums are normalized to string enums to match google-genai's enum handling.