QConnect / Client / send_message
send_message¶
- QConnect.Client.send_message(**kwargs)¶
Submits a message to the Amazon Q in Connect session.
See also: AWS API Documentation
Request Syntax
response = client.send_message( assistantId='string', sessionId='string', type='TEXT', message={ 'value': { 'text': { 'value': 'string' } } }, conversationContext={ 'selfServiceConversationHistory': [ { 'turnNumber': 123, 'inputTranscript': 'string', 'botResponse': 'string' }, ] }, configuration={ 'generateFillerMessage': True|False }, clientToken='string' )
- Parameters:
assistantId (string) –
[REQUIRED]
The identifier of the Amazon Q in Connect assistant.
sessionId (string) –
[REQUIRED]
The identifier of the Amazon Q in Connect session.
type (string) –
[REQUIRED]
The message type.
message (dict) –
[REQUIRED]
The message data to submit to the Amazon Q in Connect session.
value (dict) – [REQUIRED]
The message input value.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
text
.text (dict) –
The message data in text type.
value (string) –
The value of the message data in text type.
conversationContext (dict) –
The conversation context before the Amazon Q in Connect session.
selfServiceConversationHistory (list) – [REQUIRED]
The self service conversation history before the Amazon Q in Connect session.
(dict) –
The conversation history data to included in conversation context data before the Amazon Q in Connect session.
turnNumber (integer) – [REQUIRED]
The number of turn of the conversation history data.
inputTranscript (string) –
The input transcript of the conversation history data.
botResponse (string) –
The bot response of the conversation history data.
configuration (dict) –
The configuration of the SendMessage request.
generateFillerMessage (boolean) –
Generates a filler response when tool selection is
QUESTION
.
clientToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the AWS SDK populates this field.For more information about idempotency, see Making retries safe with idempotent APIs.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'requestMessageId': 'string', 'configuration': { 'generateFillerMessage': True|False }, 'nextMessageToken': 'string' }
Response Structure
(dict) –
requestMessageId (string) –
The identifier of the submitted message.
configuration (dict) –
The configuration of the SendMessage request.
generateFillerMessage (boolean) –
Generates a filler response when tool selection is
QUESTION
.
nextMessageToken (string) –
The token for the next message, used by GetNextMessage.
Exceptions