Skip to content

Qbusiness  >  Operations  >  chat_sync

chat_sync

Operation

chat_sync async

chat_sync(input: ChatSyncInput, plugins: list[Plugin] | None = None) -> ChatSyncOutput

Starts or continues a non-streaming Amazon Q Business conversation.

Parameters:

Name Type Description Default
input ChatSyncInput

An instance of ChatSyncInput.

required
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

Returns:

Type Description
ChatSyncOutput

An instance of ChatSyncOutput.

Input

ChatSyncInput dataclass

Dataclass for ChatSyncInput structure.

Attributes

action_execution class-attribute instance-attribute
action_execution: ActionExecution | None = 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 = 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 = 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 = 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 = None

An authentication verification event response by a third party authentication server to Amazon Q Business.

chat_mode class-attribute instance-attribute
chat_mode: ChatMode | None = 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 = None

The chat mode configuration for an Amazon Q Business application.

client_token class-attribute instance-attribute
client_token: str | None = None

A token that you provide to identify a chat request.

conversation_id class-attribute instance-attribute
conversation_id: str | None = None

The identifier of the Amazon Q Business conversation.

parent_message_id class-attribute instance-attribute
parent_message_id: str | None = None

The identifier of the previous system message in a conversation.

user_groups class-attribute instance-attribute
user_groups: list[str] | None = None

The group names that a user associated with the chat input belongs to.

user_id class-attribute instance-attribute
user_id: str | None = None

The identifier of the user attached to the chat input.

user_message class-attribute instance-attribute
user_message: str | None = None

A end user message in a conversation.

Output

ChatSyncOutput dataclass

Dataclass for ChatSyncOutput structure.

Attributes

action_review class-attribute instance-attribute
action_review: ActionReview | None = 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 = 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 = None

The identifier of the Amazon Q Business conversation.

failed_attachments class-attribute instance-attribute
failed_attachments: list[AttachmentOutput] | None = None

A list of files which failed to upload during chat.

source_attributions class-attribute instance-attribute
source_attributions: list[SourceAttribution | None] | None = None

The source documents used to generate the conversation response.

system_message class-attribute instance-attribute
system_message: str | None = None

An AI-generated message in a conversation.

system_message_id class-attribute instance-attribute
system_message_id: str | None = None

The identifier of an Amazon Q Business AI generated message within the conversation.

user_message_id class-attribute instance-attribute
user_message_id: str | None = None

The identifier of an Amazon Q Business end user text input message within the conversation.