create_ai_prompt
¶
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[QConnectClientConfig] = 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/q_connect.py
2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 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 | |