create_ai_prompt
async
¶
create_ai_prompt(
assistant_id: UuidOrArn,
name: Name,
type: AIPromptType,
template_configuration: AIPromptTemplateConfiguration,
visibility_status: VisibilityStatus,
template_type: AIPromptTemplateType,
model_id: AIPromptModelIdentifier,
api_format: AIPromptAPIFormat,
*,
config_overrides: Optional[AsyncQConnectClientConfig] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[Tags] = None,
description: Optional[Description] = None,
inference_configuration: Optional[AIPromptInferenceConfiguration] = None,
) -> CreateAIPromptResponse
Creates an Amazon Q in Connect AI Prompt.
Parameters:
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs..
-
assistant_id(UuidOrArn) –The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
-
name(Name) –The name of the AI Prompt.
-
type(AIPromptType) –The type of this AI Prompt.
-
template_configuration(AIPromptTemplateConfiguration) –The configuration of the prompt template for this AI Prompt.
-
visibility_status(VisibilityStatus) –The visibility status of the AI Prompt.
-
template_type(AIPromptTemplateType) –The type of the prompt template for this AI Prompt.
-
model_id(AIPromptModelIdentifier) –The identifier of the model used for this AI Prompt.
For information about which models are supported in each Amazon Web Services Region, see Supported models for system/custom prompts.
-
api_format(AIPromptAPIFormat) –The API Format of the AI Prompt.
Recommended values:
MESSAGES | TEXT_COMPLETIONSThe values
ANTHROPIC_CLAUDE_MESSAGES | ANTHROPIC_CLAUDE_TEXT_COMPLETIONSwill be deprecated. -
tags(Optional[Tags], default:None) –The tags used to organize, track, or control access for this resource.
-
description(Optional[Description], default:None) –The description of the AI Prompt.
-
inference_configuration(Optional[AIPromptInferenceConfiguration], default:None) –The inference configuration for the AI Prompt being created.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–The request could not be processed because of conflict in the current state of the resource. For example, if you're using a
CreateAPI (such asCreateAssistant) that accepts name, a conflicting resource (usually with the same name) is being created or mutated. -
ResourceNotFoundException–The specified resource does not exist.
-
ServiceQuotaExceededException–You've exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use service quotas to request a service quota increase.
-
ThrottlingException–The throttling limit has been exceeded.
-
UnauthorizedException–You do not have permission to perform this action.
-
ValidationException–The input fails to satisfy the constraints specified by a service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_qconnect/_services/async_q_connect.py
2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 | |