Early Beta — The Web SDK is in early beta. APIs may change between releases.
Overview
Pass a prompt and nothing else. Every other option falls back to the SDK default, so this is the shortest path from a loaded model to text.Basic usage
RunAnywhere.textGeneration.chat() wraps the same call:
Signature
Conversation history
Prior turns go onhistory as ChatMessage values, not concatenated into the prompt. A
conversationId lets a backend reuse its prompt cache across turns.
timestampUs is microseconds since the Unix epoch, and ChatMessage is a proto message, so the
required scalar and repeated fields (toolCalls, metadata, attachments) must be present.
With options
Error handling
Related
Generate
Full generation with options and metrics
Streaming
Real-time token streaming