HealthLake / Client / update_profile_with_agent

update_profile_with_agent

HealthLake.Client.update_profile_with_agent(**kwargs)

Updates a data transformation profile using chat-based interaction with an agent. Supports multi-turn conversations for iteratively customizing profiles.

See also: AWS API Documentation

Request Syntax

response = client.update_profile_with_agent(
    ProfileId='string',
    InputMessage={
        'Body': 'string',
        'Type': 'normal'|'confirmation_response'
    },
    ConversationId='string'
)
Parameters:
  • ProfileId (string) –

    [REQUIRED]

    The unique identifier of the profile to update via the agent.

  • InputMessage (dict) –

    [REQUIRED]

    The message to send to the agent.

    • Body (string) – [REQUIRED]

      The text of your message to the agent.

    • Type (string) – [REQUIRED]

      The type of input message, which determines how the agent processes your request. Valid values:

      • normal: A regular message to the agent.

      • confirmation_response: A response to a confirmation request from the agent.

  • ConversationId (string) – The conversation identifier for multi-turn interactions. Omit to start a new conversation.

Return type:

dict

Returns:

The response of this operation contains an EventStream member. When iterated the EventStream will yield events based on the structure below, where only one of the top level keys will be present for any given event.

Response Syntax

{
    'AgentResponse': EventStream({
        'TextMessageEvent': {
            'Message': 'string'
        },
        'ProgressEvent': {
            'Message': 'string'
        },
        'HeartbeatEvent': {},
        'ErrorEvent': {
            'Error': 'InternalServerException'|'ResourceNotFoundException'|'ValidationException'|'AccessDeniedException'|'ThrottlingException',
            'Message': 'string'
        },
        'EndOfOutputEvent': {
            'FinalResponseMessage': 'string',
            'Options': [
                'string',
            ],
            'ConversationId': 'string'
        }
    })
}

Response Structure

  • (dict) –

    The response from the UpdateProfileWithAgent operation.

    • AgentResponse (EventStream) –

      The streaming response from the agent.

      • TextMessageEvent (dict) –

        An incremental text update from the agent.

        • Message (string) –

          An incremental text update from the agent.

      • ProgressEvent (dict) –

        An incremental progress update from the agent.

        • Message (string) –

          An incremental progress update message by the agent

      • HeartbeatEvent (dict) –

        Periodically emitted event to keep the connection alive.

      • ErrorEvent (dict) –

        An exception encountered while serving the request.

        • Error (string) –

          The type of the exception.

        • Message (string) –

          The exception message.

      • EndOfOutputEvent (dict) –

        The final event in the response stream from the agent during chat-based profile customization. The caller can assume that the stream has ended upon receiving this event.

        • FinalResponseMessage (string) –

          The final response message from the agent.

        • Options (list) –

          The response options that you can use to easily answer follow-up questions from the agent.

          • (string) –

        • ConversationId (string) –

          The conversation ID of the request. You can use this ID to continue the profile mapping based on this request’s context at a later time.

Exceptions