QBusinessClient.chat
rboto-qbusiness==0.4.0 · Service index · Types
Model summary (excerpt): Starts or continues a streaming Amazon Q Business conversation.
Install and imports
from rboto import QBusinessClient
from collections.abc import AsyncIterator, Sequence
from rboto_qbusiness.types import (
ChatInputStream,
ChatOutput,
)
Signature
async def chat(
*,
application_id: str,
user_id: str | None = None,
user_groups: Sequence[str] | None = None,
conversation_id: str | None = None,
parent_message_id: str | None = None,
client_token: str | None = None,
input_stream: AsyncIterator[ChatInputStream] | None = None,
) -> ChatOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
application_id |
Yes | The identifier of the Amazon Q Business application linked to a streaming Amazon Q Business conversation. |
user_id |
No | The identifier of the user attached to the chat input. |
user_groups |
No | The group names that a user associated with the chat input belongs to. |
conversation_id |
No | The identifier of the Amazon Q Business conversation. |
parent_message_id |
No | The identifier used to associate a user message with a AI generated response. |
client_token |
No | A token that you provide to identify the chat input. |
input_stream |
No | The streaming input for the Chat API. |
Output
ChatOutput.
Typed response mapping, accessed as response["field"].
| Field | Type | Presence | References |
|---|---|---|---|
output_stream |
AsyncIterator[ChatOutputStream] |
Always present | ChatOutputStream |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
Output streams: ChatOutput.
Consume with async for. Do not reuse a consumed stream.
Input event streams accept the declared AsyncIterator of typed events.
Errors
Import from rboto_qbusiness.exceptions:
AccessDeniedError, ConflictError, ExternalResourceError, InternalServerError, LicenseNotFoundError, ResourceNotFoundError, ThrottlingError, ValidationError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.