class documentation

A Temporal-based LLM model that executes model invocations as activities.

Method __init__ Initialize the TemporalModel.
Async Method generate_content_async Generate content asynchronously by executing model invocation as a Temporal activity.
Instance Variable _activity_options Undocumented
Instance Variable _model_name Undocumented
def __init__(self, model_name: str, activity_options: ActivityConfig | None = None): (source)

Initialize the TemporalModel.

Parameters
model_name:strThe name of the model to use.
activity_options:ActivityConfig | NoneConfiguration options for the activity execution.
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
llm_request:LlmRequestThe LLM request containing model parameters and content.
stream:boolWhether to stream the response (currently ignored).
Returns
AsyncGenerator[LlmResponse, None]Undocumented
Yields
The responses from the model.
_activity_options = (source)

Undocumented

_model_name = (source)

Undocumented