create_prompt_router
¶
create_prompt_router(
prompt_router_name: PromptRouterName,
models: PromptRouterTargetModels,
routing_criteria: RoutingCriteria,
fallback_model: PromptRouterTargetModel,
*,
config_overrides: Optional[BedrockClientConfig] = 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/bedrock.py
6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 | |