class documentation
class TemporalModel(BaseLlm): (source)
Constructor: TemporalModel(model_name, activity_options)
A Temporal-based LLM model that executes model invocations as activities.
| Method | __init__ |
Initialize the TemporalModel. |
| Async Method | generate |
Generate content asynchronously by executing model invocation as a Temporal activity. |
| Instance Variable | _activity |
Undocumented |
| Instance Variable | _model |
Undocumented |
async def generate_content_async(self, llm_request:
LlmRequest, stream: bool = False) -> AsyncGenerator[ LlmResponse, None]:
(source)
¶
Generate content asynchronously by executing model invocation as a Temporal activity.
| Parameters | |
llmLlmRequest | The LLM request containing model parameters and content. |
stream:bool | Whether to stream the response (currently ignored). |
| Returns | |
AsyncGenerator[ | Undocumented |
| Yields | |
| The responses from the model. |