ChatApi class

Logical chat service contract. Host conversation state, UI rendering, and backend execution remain adapter-owned; this service describes only the portable Generate / Stream entry points over generated messages.

Constructors

ChatApi(RpcClient _client)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

generate(ClientContext? ctx, ChatGenerationRequest request) Future<ChatGenerationResult>
Non-streaming generation: returns the completed assistant message and optional LLMGenerationResult/ToolCall aggregates in one response.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stream(ClientContext? ctx, ChatGenerationRequest request) Future<ChatStreamEvent>
Server-streaming generation: emits per-token, tool-call, tool-result, and completion events until the turn terminates.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited