chat_sync¶
Operation¶
chat_sync
¶
chat_sync(request: ChatSyncInput | ChatSyncInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ChatSyncInputDict]) -> ChatSyncOutput
Starts or continues a non-streaming Amazon Q Business conversation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ChatSyncInput | ChatSyncInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[ChatSyncInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
ChatSyncOutput
|
An instance of |
chat_sync
async
¶
chat_sync(request: ChatSyncInput | ChatSyncInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ChatSyncInputDict]) -> ChatSyncOutput
Starts or continues a non-streaming Amazon Q Business conversation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ChatSyncInput | ChatSyncInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[ChatSyncInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
ChatSyncOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
ChatSyncInputDict
¶
Bases: TypedDict
Dictionary form of ChatSyncInput.
Attributes¶
action_execution
instance-attribute
¶
action_execution: ActionExecution | ActionExecutionDict | None
A request from an end user to perform an Amazon Q Business plugin action.
application_id
instance-attribute
¶
The identifier of the Amazon Q Business application linked to the Amazon Q Business conversation.
attachments
instance-attribute
¶
attachments: Sequence[AttachmentInput | AttachmentInputDict] | None
A list of files uploaded directly during chat. You can upload a maximum of 5 files of upto 10 MB each.
attribute_filter
instance-attribute
¶
attribute_filter: AttributeFilter | AttributeFilterDict | None
Enables filtering of Amazon Q Business web experience responses based on document attributes or metadata fields.
auth_challenge_response
instance-attribute
¶
auth_challenge_response: AuthChallengeResponse | AuthChallengeResponseDict | None
An authentication verification event response by a third party authentication server to Amazon Q Business.
chat_mode
instance-attribute
¶
chat_mode: str | None
The chatMode parameter determines the chat modes available to Amazon Q
Business users:
-
RETRIEVAL_MODE- If you choose this mode, Amazon Q generates responses solely from the data sources connected and indexed by the application. If an answer is not found in the data sources or there are no data sources available, Amazon Q will respond with a "No Answer Found" message, unless LLM knowledge has been enabled. In that case, Amazon Q will generate a response from the LLM knowledge -
CREATOR_MODE- By selecting this mode, you can choose to generate responses only from the LLM knowledge. You can also attach files and have Amazon Q generate a response based on the data in those files. If the attached files do not contain an answer for the query, Amazon Q will automatically fall back to generating a response from the LLM knowledge. -
PLUGIN_MODE- By selecting this mode, users can choose to use plugins in chat to get their responses.
Note
If none of the modes are selected, Amazon Q will only respond using the information from the attached files.
For more information, see Admin controls and guardrails, Plugins, and Response sources.
chat_mode_configuration
instance-attribute
¶
chat_mode_configuration: ChatModeConfiguration | ChatModeConfigurationDict | None
The chat mode configuration for an Amazon Q Business application.
client_token
instance-attribute
¶
client_token: str | None
A token that you provide to identify a chat request.
This field is autopopulated if not provided.
conversation_id
instance-attribute
¶
conversation_id: str | None
The identifier of the Amazon Q Business conversation.
parent_message_id
instance-attribute
¶
parent_message_id: str | None
The identifier of the previous system message in a conversation.
user_groups
instance-attribute
¶
The group names that a user associated with the chat input belongs to.
ChatSyncInput
dataclass
¶
Bases: _SerdeShape
Dataclass for ChatSyncInput structure.
Attributes¶
action_execution
class-attribute
instance-attribute
¶
action_execution: ActionExecution | None = ...
A request from an end user to perform an Amazon Q Business plugin action.
application_id
class-attribute
instance-attribute
¶
application_id: str | None = ...
The identifier of the Amazon Q Business application linked to the Amazon Q Business conversation.
attachments
class-attribute
instance-attribute
¶
attachments: list[AttachmentInput] | None = ...
A list of files uploaded directly during chat. You can upload a maximum of 5 files of upto 10 MB each.
attribute_filter
class-attribute
instance-attribute
¶
attribute_filter: AttributeFilter | None = ...
Enables filtering of Amazon Q Business web experience responses based on document attributes or metadata fields.
auth_challenge_response
class-attribute
instance-attribute
¶
auth_challenge_response: AuthChallengeResponse | None = ...
An authentication verification event response by a third party authentication server to Amazon Q Business.
chat_mode
class-attribute
instance-attribute
¶
chat_mode: str | None = ...
The chatMode parameter determines the chat modes available to Amazon Q
Business users:
-
RETRIEVAL_MODE- If you choose this mode, Amazon Q generates responses solely from the data sources connected and indexed by the application. If an answer is not found in the data sources or there are no data sources available, Amazon Q will respond with a "No Answer Found" message, unless LLM knowledge has been enabled. In that case, Amazon Q will generate a response from the LLM knowledge -
CREATOR_MODE- By selecting this mode, you can choose to generate responses only from the LLM knowledge. You can also attach files and have Amazon Q generate a response based on the data in those files. If the attached files do not contain an answer for the query, Amazon Q will automatically fall back to generating a response from the LLM knowledge. -
PLUGIN_MODE- By selecting this mode, users can choose to use plugins in chat to get their responses.
Note
If none of the modes are selected, Amazon Q will only respond using the information from the attached files.
For more information, see Admin controls and guardrails, Plugins, and Response sources.
chat_mode_configuration
class-attribute
instance-attribute
¶
chat_mode_configuration: ChatModeConfiguration | None = ...
The chat mode configuration for an Amazon Q Business application.
client_token
class-attribute
instance-attribute
¶
client_token: str | None = ...
A token that you provide to identify a chat request.
This field is autopopulated if not provided.
conversation_id
class-attribute
instance-attribute
¶
conversation_id: str | None = ...
The identifier of the Amazon Q Business conversation.
parent_message_id
class-attribute
instance-attribute
¶
parent_message_id: str | None = ...
The identifier of the previous system message in a conversation.
user_groups
class-attribute
instance-attribute
¶
The group names that a user associated with the chat input belongs to.
Output¶
ChatSyncOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for ChatSyncOutput structure.
Attributes¶
action_review
class-attribute
instance-attribute
¶
action_review: ActionReview | None = ...
A request from Amazon Q Business to the end user for information Amazon Q Business needs to successfully complete a requested plugin action.
auth_challenge_request
class-attribute
instance-attribute
¶
auth_challenge_request: AuthChallengeRequest | None = ...
An authentication verification event activated by an end user request to use a custom plugin.
conversation_id
class-attribute
instance-attribute
¶
conversation_id: str | None = ...
The identifier of the Amazon Q Business conversation.
failed_attachments
class-attribute
instance-attribute
¶
failed_attachments: list[AttachmentOutput] | None = ...
A list of files which failed to upload during chat.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
source_attributions
class-attribute
instance-attribute
¶
source_attributions: list[SourceAttribution | None] | None = ...
The source documents used to generate the conversation response.
system_message
class-attribute
instance-attribute
¶
system_message: str | None = ...
An AI-generated message in a conversation.