Skip to content

Commit

Permalink
feat(client-bedrock-agent): Amazon Bedrock Prompt Flows and Prompt Ma…
Browse files Browse the repository at this point in the history
…nagement now supports using inference profiles to increase throughput and improve resilience.
  • Loading branch information
awstools committed Sep 23, 2024
1 parent f69b00e commit 3db793d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
10 changes: 5 additions & 5 deletions clients/client-bedrock-agent/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ export interface PromptOverrideConfiguration {
promptConfigurations: PromptConfiguration[] | undefined;

/**
* <p>The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. If you specify this field, at least one of the <code>promptConfigurations</code> must contain a <code>parserMode</code> value that is set to <code>OVERRIDDEN</code>. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/lambda-parser.html">Parser Lambda function in Agents for Amazon Bedrock</a>.</p>
* <p>The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. If you specify this field, at least one of the <code>promptConfigurations</code> must contain a <code>parserMode</code> value that is set to <code>OVERRIDDEN</code>. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/lambda-parser.html">Parser Lambda function in Amazon Bedrock Agents</a>.</p>
* @public
*/
overrideLambda?: string;
Expand Down Expand Up @@ -1648,7 +1648,7 @@ export interface CreateAgentRequest {
instruction?: string;

/**
* <p>The foundation model to be used for orchestration by the agent you create.</p>
* <p>The Amazon Resource Name (ARN) of the foundation model to be used for orchestration by the agent you create.</p>
* @public
*/
foundationModel?: string;
Expand Down Expand Up @@ -3913,7 +3913,7 @@ export interface KnowledgeBaseFlowNodeConfiguration {
knowledgeBaseId: string | undefined;

/**
* <p>The unique identifier of the model to use to generate a response from the query results. Omit this field if you want to return the retrieved results as an array.</p>
* <p>The unique identifier of the model or <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html">inference profile</a> to use to generate a response from the query results. Omit this field if you want to return the retrieved results as an array.</p>
* @public
*/
modelId?: string;
Expand Down Expand Up @@ -4132,7 +4132,7 @@ export interface PromptFlowNodeInlineConfiguration {
templateConfiguration: PromptTemplateConfiguration | undefined;

/**
* <p>The unique identifier of the model to run inference with.</p>
* <p>The unique identifier of the model or <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html">inference profile</a> to run inference with.</p>
* @public
*/
modelId: string | undefined;
Expand Down Expand Up @@ -7479,7 +7479,7 @@ export interface PromptVariant {
templateConfiguration?: PromptTemplateConfiguration;

/**
* <p>The unique identifier of the model with which to run inference on the prompt.</p>
* <p>The unique identifier of the model or <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html">inference profile</a> with which to run inference on the prompt.</p>
* @public
*/
modelId?: string;
Expand Down
24 changes: 17 additions & 7 deletions codegen/sdk-codegen/aws-models/bedrock-agent.json
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,7 @@
"foundationModel": {
"target": "com.amazonaws.bedrockagent#ModelIdentifier",
"traits": {
"smithy.api#documentation": "<p>The foundation model to be used for orchestration by the agent you create.</p>"
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the foundation model to be used for orchestration by the agent you create.</p>"
}
},
"description": {
Expand Down Expand Up @@ -8032,9 +8032,9 @@
}
},
"modelId": {
"target": "com.amazonaws.bedrockagent#ModelIdentifier",
"target": "com.amazonaws.bedrockagent#KnowledgeBaseModelIdentifier",
"traits": {
"smithy.api#documentation": "<p>The unique identifier of the model to use to generate a response from the query results. Omit this field if you want to return the retrieved results as an array.</p>"
"smithy.api#documentation": "<p>The unique identifier of the model or <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html\">inference profile</a> to use to generate a response from the query results. Omit this field if you want to return the retrieved results as an array.</p>"
}
}
},
Expand All @@ -8051,6 +8051,16 @@
"smithy.api#pattern": "^[0-9a-zA-Z]+$"
}
},
"com.amazonaws.bedrockagent#KnowledgeBaseModelIdentifier": {
"type": "string",
"traits": {
"smithy.api#length": {
"min": 1,
"max": 2048
},
"smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:provisioned-model/[a-z0-9]{12})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][_-]?)+)|(arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{1,20}):(|[0-9]{12}):(model-gateway|inference-profile)/[a-zA-Z0-9-:.]+)|([a-zA-Z0-9-:.]+)$"
}
},
"com.amazonaws.bedrockagent#KnowledgeBaseResource": {
"type": "resource",
"operations": [
Expand Down Expand Up @@ -10305,7 +10315,7 @@
"modelId": {
"target": "com.amazonaws.bedrockagent#PromptModelIdentifier",
"traits": {
"smithy.api#documentation": "<p>The unique identifier of the model to run inference with.</p>",
"smithy.api#documentation": "<p>The unique identifier of the model or <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html\">inference profile</a> to run inference with.</p>",
"smithy.api#required": {}
}
},
Expand Down Expand Up @@ -10477,7 +10487,7 @@
"min": 1,
"max": 2048
},
"smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:provisioned-model/[a-z0-9]{12})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][_-]?)+)$"
"smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:provisioned-model/[a-z0-9]{12})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][_-]?)+)|(arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{1,20}):(|[0-9]{12}):(model-gateway|inference-profile)/[a-zA-Z0-9-:.]+)|([a-zA-Z0-9-:.]+)$"
}
},
"com.amazonaws.bedrockagent#PromptModelInferenceConfiguration": {
Expand Down Expand Up @@ -10537,7 +10547,7 @@
"overrideLambda": {
"target": "com.amazonaws.bedrockagent#LambdaArn",
"traits": {
"smithy.api#documentation": "<p>The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. If you specify this field, at least one of the <code>promptConfigurations</code> must contain a <code>parserMode</code> value that is set to <code>OVERRIDDEN</code>. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/lambda-parser.html\">Parser Lambda function in Agents for Amazon Bedrock</a>.</p>"
"smithy.api#documentation": "<p>The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. If you specify this field, at least one of the <code>promptConfigurations</code> must contain a <code>parserMode</code> value that is set to <code>OVERRIDDEN</code>. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/lambda-parser.html\">Parser Lambda function in Amazon Bedrock Agents</a>.</p>"
}
}
},
Expand Down Expand Up @@ -10743,7 +10753,7 @@
"modelId": {
"target": "com.amazonaws.bedrockagent#PromptModelIdentifier",
"traits": {
"smithy.api#documentation": "<p>The unique identifier of the model with which to run inference on the prompt.</p>"
"smithy.api#documentation": "<p>The unique identifier of the model or <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html\">inference profile</a> with which to run inference on the prompt.</p>"
}
},
"inferenceConfiguration": {
Expand Down

0 comments on commit 3db793d

Please sign in to comment.