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
2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 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 | |