create_prompt_router
async
¶
create_prompt_router(
prompt_router_name: PromptRouterName,
models: PromptRouterTargetModels,
routing_criteria: RoutingCriteria,
fallback_model: PromptRouterTargetModel,
*,
config_overrides: Optional[AsyncBedrockClientConfig] = None,
client_request_token: Optional[IdempotencyToken] = None,
description: Optional[PromptRouterDescription] = None,
tags: Optional[TagList] = None,
) -> CreatePromptRouterResponse
Creates a prompt router that manages the routing of requests between multiple foundation models based on the routing criteria.
Parameters:
-
client_request_token(Optional[IdempotencyToken], default:None) –A unique, case-sensitive identifier that you provide to ensure idempotency of your requests. If not specified, the Amazon Web Services SDK automatically generates one for you.
-
prompt_router_name(PromptRouterName) –The name of the prompt router. The name must be unique within your Amazon Web Services account in the current region.
-
models(PromptRouterTargetModels) –A list of foundation models that the prompt router can route requests to. At least one model must be specified.
-
description(Optional[PromptRouterDescription], default:None) –An optional description of the prompt router to help identify its purpose.
-
routing_criteria(RoutingCriteria) –The criteria, which is the response quality difference, used to determine how incoming requests are routed to different models.
-
fallback_model(PromptRouterTargetModel) –The default model to use when the routing criteria is not met.
-
tags(Optional[TagList], default:None) –An array of key-value pairs to apply to this resource as tags. You can use tags to categorize and manage your Amazon Web Services resources.
Raises:
-
AccessDeniedException–The request is denied because of missing access permissions.
-
ConflictException–Error occurred because of a conflict while performing an operation.
-
InternalServerException–An internal server error occurred. Retry your request.
-
ResourceNotFoundException–The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
-
ServiceQuotaExceededException–The number of requests exceeds the service quota. Resubmit your request later.
-
ThrottlingException–The number of requests exceeds the limit. Resubmit your request later.
-
TooManyTagsException–The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
-
ValidationException–Input validation failed. Check your request parameters and retry the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock/_services/async_bedrock.py
7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 | |