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
772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 | |