QConnect / Client / list_ai_prompts
list_ai_prompts¶
- QConnect.Client.list_ai_prompts(**kwargs)¶
- Lists the AI Prompts available on the Amazon Q in Connect assistant. - See also: AWS API Documentation - Request Syntax- response = client.list_ai_prompts( assistantId='string', nextToken='string', maxResults=123, origin='SYSTEM'|'CUSTOMER' ) - 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. 
- 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. 
- origin (string) – The origin of the AI Prompts to be listed. - SYSTEMfor a default AI Agent created by Q in Connect or- CUSTOMERfor an AI Agent created by calling AI Agent creation APIs.
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'aiPromptSummaries': [ { 'name': 'string', 'assistantId': 'string', 'assistantArn': 'string', 'aiPromptId': 'string', 'type': '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', 'aiPromptArn': 'string', 'modifiedTime': datetime(2015, 1, 1), 'templateType': 'TEXT', 'modelId': 'string', 'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS'|'MESSAGES'|'TEXT_COMPLETIONS', 'visibilityStatus': 'SAVED'|'PUBLISHED', 'origin': 'SYSTEM'|'CUSTOMER', 'description': 'string', 'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED', 'tags': { 'string': 'string' } }, ], 'nextToken': 'string' } - Response Structure- (dict) – - aiPromptSummaries (list) – - The summaries of the AI Prompts. - (dict) – - The summary of the AI Prompt. - name (string) – - The name of the AI Prompt. 
- assistantId (string) – - The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN. 
- assistantArn (string) – - The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant. 
- aiPromptId (string) – - The identifier of the Amazon Q in Connect AI prompt. 
- type (string) – - The type of this AI Prompt. 
- aiPromptArn (string) – - The Amazon Resource Name (ARN) of the AI Prompt. 
- modifiedTime (datetime) – - The time the AI Prompt was last modified. 
- templateType (string) – - The type of the prompt template for this AI Prompt. 
- modelId (string) – - The identifier of the model used for this AI Prompt. Model Ids supported are: - anthropic.claude-3-haiku-20240307-v1:0.
- apiFormat (string) – - The API format used for this AI Prompt. 
- visibilityStatus (string) – - The visibility status of the AI Prompt. 
- origin (string) – - The origin of the AI Prompt. - SYSTEMfor a default AI Prompt created by Q in Connect or- CUSTOMERfor an AI Prompt created by calling AI Prompt creation APIs.
- description (string) – - The description of the AI Prompt. 
- status (string) – - The status of the AI Prompt. 
- tags (dict) – - The tags used to organize, track, or control access for this resource. - (string) – - (string) – 
 
 
 
 
- 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. 
 
 
 - Exceptions- QConnect.Client.exceptions.ValidationException
- QConnect.Client.exceptions.UnauthorizedException
- QConnect.Client.exceptions.AccessDeniedException
- QConnect.Client.exceptions.ThrottlingException
- QConnect.Client.exceptions.ResourceNotFoundException