Bedrock / Client / create_advanced_prompt_optimization_job
create_advanced_prompt_optimization_job¶
- Bedrock.Client.create_advanced_prompt_optimization_job(**kwargs)¶
Creates an asynchronous batch job for advanced prompt optimization.
See also: AWS API Documentation
Request Syntax
response = client.create_advanced_prompt_optimization_job( jobName='string', jobDescription='string', clientToken='string', inputConfig={ 's3Uri': 'string' }, outputConfig={ 's3Uri': 'string' }, encryptionKeyArn='string', tags=[ { 'key': 'string', 'value': 'string' }, ], modelConfigurations=[ { 'modelId': 'string', 'inferenceConfig': { 'maxTokens': 123, 'temperature': ..., 'topP': ..., 'stopSequences': [ 'string', ] }, 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None } }, ] )
- Parameters:
jobName (string) –
[REQUIRED]
Name of the advanced prompt optimization job.
jobDescription (string) – Description of the advanced prompt optimization job.
clientToken (string) –
Idempotency token for the request.
This field is autopopulated if not provided.
inputConfig (dict) –
[REQUIRED]
Input data configuration for the advanced prompt optimization job.
s3Uri (string) – [REQUIRED]
S3 URI of the input JSONL file.
outputConfig (dict) –
[REQUIRED]
Output data configuration for the advanced prompt optimization job.
s3Uri (string) – [REQUIRED]
S3 URI prefix for the output location.
encryptionKeyArn (string) – KMS key ARN for encrypting output data.
tags (list) –
Tags to associate with the job.
(dict) –
Definition of the key/value pair for a tag.
key (string) – [REQUIRED]
Key for the tag.
value (string) – [REQUIRED]
Value for the tag.
modelConfigurations (list) –
[REQUIRED]
Model configurations for advanced prompt optimization.
(dict) –
Configuration for a model used in advanced prompt optimization.
modelId (string) – [REQUIRED]
The model ID.
inferenceConfig (dict) –
Inference configuration for the model.
maxTokens (integer) –
The maximum number of tokens to generate.
temperature (float) –
The temperature for sampling.
topP (float) –
The top-p value for nucleus sampling.
stopSequences (list) –
Stop sequences that end generation.
(string) –
additionalModelRequestFields (dict) –
Additional model request fields.
(string) –
(document) –
- Return type:
dict
- Returns:
Response Syntax
{ 'jobArn': 'string' }
Response Structure
(dict) –
Create Advanced Prompt Optimization Job Response
jobArn (string) –
ARN of the created advanced prompt optimization job.
Exceptions
Bedrock.Client.exceptions.ResourceNotFoundExceptionBedrock.Client.exceptions.AccessDeniedExceptionBedrock.Client.exceptions.ValidationExceptionBedrock.Client.exceptions.ConflictExceptionBedrock.Client.exceptions.InternalServerExceptionBedrock.Client.exceptions.TooManyTagsExceptionBedrock.Client.exceptions.ServiceQuotaExceededExceptionBedrock.Client.exceptions.ThrottlingException