generate method

Future<LLMStreamEvent> generate(
  1. ClientContext? ctx,
  2. LLMGenerateRequest request
)

Server-streaming: emits one LLMStreamEvent per generated token until is_final=true. Cancellation aborts the underlying generation via the existing rac_llm_cancel() C ABI.

Tool-driven streaming is not supported on this entry point even when options.tool_calling is populated. Use the non-streaming tool-session generation path for tool calling.

Implementation

$async.Future<LLMStreamEvent> generate(
        $pb.ClientContext? ctx, LLMGenerateRequest request) =>
    _client.invoke<LLMStreamEvent>(
        ctx, 'LLM', 'Generate', request, LLMStreamEvent());