QConnect / Client / list_models

list_models

QConnect.Client.list_models(**kwargs)

Lists the models available to an Amazon Q in Connect assistant in the assistant’s Amazon Web Services Region. The available models are determined by the region of the specified assistant.

See also: AWS API Documentation

Request Syntax

response = client.list_models(
    assistantId='string',
    aiPromptType='ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER'|'EMAIL_QUERY_REFORMULATION'|'ORCHESTRATION'|'NOTE_TAKING'|'CASE_SUMMARIZATION',
    modelLifecycle='ACTIVE'|'LEGACY',
    nextToken='string',
    maxResults=123
)
Parameters:
  • assistantId (string) –

    [REQUIRED]

    The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN. The assistant’s region determines which models are available.

  • aiPromptType (string) – The type of the AI Prompt to filter models by. When specified, only models that support the given AI Prompt type are returned.

  • modelLifecycle (string) – The lifecycle status of models to filter by. When specified, only models with the given lifecycle status are returned.

  • nextToken (string) – The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • maxResults (integer) – The maximum number of results to return per page.

Return type:

dict

Returns:

Response Syntax

{
    'modelSummaries': [
        {
            'modelId': 'string',
            'displayName': 'string',
            'crossRegionStatus': 'NONE'|'REGIONAL'|'GLOBAL',
            'supportsPromptCaching': True|False,
            'supportedAIPromptTypes': [
                'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION'|'EMAIL_RESPONSE'|'EMAIL_OVERVIEW'|'EMAIL_GENERATIVE_ANSWER'|'EMAIL_QUERY_REFORMULATION'|'ORCHESTRATION'|'NOTE_TAKING'|'CASE_SUMMARIZATION',
            ],
            'modelLifecycle': 'ACTIVE'|'LEGACY',
            'legacyTimestamp': datetime(2015, 1, 1),
            'endOfLifeTimestamp': datetime(2015, 1, 1),
            'globalResiliencyStatus': 'SUPPORTED'|'UNSUPPORTED'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • modelSummaries (list) –

      The summaries of the models available to the assistant.

      • (dict) –

        The summary of a model available to an Amazon Q in Connect assistant.

        • modelId (string) –

          The identifier of the model.

        • displayName (string) –

          The display name of the model.

        • crossRegionStatus (string) –

          The cross-region availability status of the model. NONE indicates the model is only available in a single region, REGIONAL indicates the model is available through regional inference, and GLOBAL indicates the model is available through global cross-region inference.

        • supportsPromptCaching (boolean) –

          Whether the model supports prompt caching.

        • supportedAIPromptTypes (list) –

          The list of AI Prompt types that the model supports.

          • (string) –

        • modelLifecycle (string) –

          The current lifecycle of the model. ACTIVE indicates the model is recommended for use and LEGACY indicates the model is still usable but is deprecated.

        • legacyTimestamp (datetime) –

          The timestamp when the model lifecycle will transition from ACTIVE to LEGACY.

        • endOfLifeTimestamp (datetime) –

          The timestamp when the model will reach end of life and no longer be available for use.

        • globalResiliencyStatus (string) –

          Whether this model is published in every Region of the caller’s Amazon Connect Global Resiliency replication group, and so can be referenced by an AI Prompt that replicates. Present only for callers to which global resiliency applies.

    • nextToken (string) –

      If there are additional results, this is the token for the next set of results.

Exceptions