Skip to main content
Chat represents one conversation and gives direct control over prompts, context, and streaming. Use IllaSDK#createChat unless you need custom dependency wiring.

Construction

Properties

getId(): string

Returns the chat identifier.

messages: Promise<MessageHistoryType>

Returns current message history from the context manager.

Core methods

sendMessage(prompt, options?)

Rules:
  • Single Prompt must be text-kind.
  • Prompt[] is for tool-result prompts only.

sendMessageStreaming(prompt, options?)

Streams telemetry and final result via callbacks.

getContext() / setContext(snapshot)

Read/replace persisted chat context.

awaitAction(descriptor)

Requires asyncToolChecker at construction. Descriptor fields are toolName, protocol, and args.

Example

See also