Create a chat client for the given Worker base URL.
Base URL of the Worker. Requests post to ${baseUrl}/api/chat.
Optionaloptions: ChatApiClientOptionsOptional retry, debounce, and timeout settings.
Send the conversation to the chat endpoint and return the assistant's reply, retrying transient failures with backoff up to ChatApiClientOptions.maxRetries times.
The full conversation so far, oldest message first.
The assistant's reply and any cited sources.
DebounceError when called within the debounce window.
ChatApiError when the request fails after all retries.
Typed client for the Claudius Worker chat API. Handles debouncing, per-attempt timeouts, and automatic retries with backoff for transient failures (HTTP 429/503, network errors, timeouts).
Example