create_advanced_prompt_optimization_job
async
¶
create_advanced_prompt_optimization_job(
job_name: AdvancedPromptOptimizationJobName,
input_config: AdvancedPromptOptimizationInputConfig,
output_config: AdvancedPromptOptimizationOutputConfig,
model_configurations: ModelConfigurations,
*,
config_overrides: Optional[AsyncBedrockClientConfig] = None,
job_description: Optional[AdvancedPromptOptimizationJobDescription] = None,
client_token: Optional[IdempotencyToken] = None,
encryption_key_arn: Optional[KmsKeyArn] = None,
tags: Optional[TagList] = None,
) -> CreateAdvancedPromptOptimizationJobResponse
Creates an advanced prompt optimization job. The job optimizes your prompt templates for specific models using your evaluation dataset and criteria.
Parameters:
-
job_name(AdvancedPromptOptimizationJobName) –A name for the advanced prompt optimization job.
-
job_description(Optional[AdvancedPromptOptimizationJobDescription], default:None) –A description of the advanced prompt optimization job.
-
client_token(Optional[IdempotencyToken], default:None) –A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request but does not return an error.
-
input_config(AdvancedPromptOptimizationInputConfig) –Specifies the S3 location of your JSONL input file containing prompt templates and evaluation samples.
-
output_config(AdvancedPromptOptimizationOutputConfig) –Specifies the S3 location where optimization results will be stored.
-
encryption_key_arn(Optional[KmsKeyArn], default:None) –The Amazon Resource Name (ARN) of the KMS key used for encrypting the output data. If not specified, the output is encrypted with an Amazon-owned KMS key.
-
tags(Optional[TagList], default:None) –Tags to associate with the advanced prompt optimization job.
-
model_configurations(ModelConfigurations) –A list of model configurations specifying the target models for prompt optimization. You can specify up to 5 models.
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
687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 | |