Class: ChatResponse
A dataclass returned by every chat() and chat_sync() call. Provides typed access to the response and metadata.
Fields
The AI’s response text. This is what you display to the user.
Whether the request succeeded.
"success" means the LLM returned a valid response. "error" means something went wrong (LLM failure, timeout, etc.).The
user_id you passed to chat(). Echoed back for convenience.The
platform you passed to chat(). Defaults to "default".End-to-end latency in seconds, from when
chat() was called to when the response was ready.UTC timestamp of the response in ISO 8601 format (e.g.
"2025-01-15T10:30:00.000Z").Error message when
status == "error". None on success.Special methods
__bool__
if response: returns True when status == "success".
__str__
print(response) and str(response) return response.text.
