Skip to content

Commit

Permalink
feat(client-bedrock-agent-runtime): Releasing the support for Action …
Browse files Browse the repository at this point in the history
…User Confirmation.
  • Loading branch information
awstools committed Aug 23, 2024
1 parent def8960 commit 60d1a5a
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
* actionGroup: "STRING_VALUE", // required
* httpMethod: "STRING_VALUE",
* apiPath: "STRING_VALUE",
* confirmationState: "CONFIRM" || "DENY",
* responseBody: { // ResponseBody
* "<keys>": { // ContentBody
* body: "STRING_VALUE",
Expand All @@ -100,6 +101,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
* },
* functionResult: { // FunctionResult
* actionGroup: "STRING_VALUE", // required
* confirmationState: "CONFIRM" || "DENY",
* function: "STRING_VALUE",
* responseBody: {
* "<keys>": {
Expand Down Expand Up @@ -578,6 +580,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
* // },
* // },
* // },
* // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT",
* // },
* // functionInvocationInput: { // FunctionInvocationInput
* // actionGroup: "STRING_VALUE", // required
Expand All @@ -589,6 +592,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
* // },
* // ],
* // function: "STRING_VALUE",
* // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT",
* // },
* // },
* // ],
Expand Down
53 changes: 53 additions & 0 deletions clients/client-bedrock-agent-runtime/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,21 @@ export interface ActionGroupInvocationOutput {
text?: string;
}

/**
* @public
* @enum
*/
export const ActionInvocationType = {
RESULT: "RESULT",
USER_CONFIRMATION: "USER_CONFIRMATION",
USER_CONFIRMATION_AND_RESULT: "USER_CONFIRMATION_AND_RESULT",
} as const;

/**
* @public
*/
export type ActionInvocationType = (typeof ActionInvocationType)[keyof typeof ActionInvocationType];

/**
* <p>There was an issue with a dependency due to a server issue. Retry your request.</p>
* @public
Expand Down Expand Up @@ -995,6 +1010,20 @@ export const SearchType = {
*/
export type SearchType = (typeof SearchType)[keyof typeof SearchType];

/**
* @public
* @enum
*/
export const ConfirmationState = {
CONFIRM: "CONFIRM",
DENY: "DENY",
} as const;

/**
* @public
*/
export type ConfirmationState = (typeof ConfirmationState)[keyof typeof ConfirmationState];

/**
* <p>Contains the body of the API response.</p>
* <p>This data type is used in the following API operations:</p>
Expand Down Expand Up @@ -1058,6 +1087,12 @@ export interface ApiResult {
*/
apiPath?: string;

/**
* <p>Controls the API operations or functions to invoke based on the user confirmation.</p>
* @public
*/
confirmationState?: ConfirmationState;

/**
* <p>The response body from the API operation. The key of the object is the content type (currently, only <code>TEXT</code> is supported). The response may be returned directly or from the Lambda function.</p>
* @public
Expand Down Expand Up @@ -1095,6 +1130,12 @@ export interface FunctionResult {
*/
actionGroup: string | undefined;

/**
* <p>Contains the user confirmation information about the function that was called.</p>
* @public
*/
confirmationState?: ConfirmationState;

/**
* <p>The name of the function that was called.</p>
* @public
Expand Down Expand Up @@ -1670,6 +1711,12 @@ export interface ApiInvocationInput {
* @public
*/
requestBody?: ApiRequestBody;

/**
* <p>Contains information about the API operation to invoke.</p>
* @public
*/
actionInvocationType?: ActionInvocationType;
}

/**
Expand Down Expand Up @@ -1732,6 +1779,12 @@ export interface FunctionInvocationInput {
* @public
*/
function?: string;

/**
* <p>Contains information about the function to invoke,</p>
* @public
*/
actionInvocationType?: ActionInvocationType;
}

/**
Expand Down
64 changes: 64 additions & 0 deletions codegen/sdk-codegen/aws-models/bedrock-agent-runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,29 @@
"smithy.api#sensitive": {}
}
},
"com.amazonaws.bedrockagentruntime#ActionInvocationType": {
"type": "enum",
"members": {
"RESULT": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "RESULT"
}
},
"USER_CONFIRMATION": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "USER_CONFIRMATION"
}
},
"USER_CONFIRMATION_AND_RESULT": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "USER_CONFIRMATION_AND_RESULT"
}
}
}
},
"com.amazonaws.bedrockagentruntime#AdditionalModelRequestFields": {
"type": "map",
"key": {
Expand Down Expand Up @@ -886,6 +909,12 @@
"traits": {
"smithy.api#documentation": "<p>The request body to provide for the API request, as the agent elicited from the user.</p>"
}
},
"actionInvocationType": {
"target": "com.amazonaws.bedrockagentruntime#ActionInvocationType",
"traits": {
"smithy.api#documentation": "<p>Contains information about the API operation to invoke.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -966,6 +995,12 @@
"smithy.api#documentation": "<p>The path to the API operation.</p>"
}
},
"confirmationState": {
"target": "com.amazonaws.bedrockagentruntime#ConfirmationState",
"traits": {
"smithy.api#documentation": "<p>Controls the API operations or functions to invoke based on the user confirmation.</p>"
}
},
"responseBody": {
"target": "com.amazonaws.bedrockagentruntime#ResponseBody",
"traits": {
Expand Down Expand Up @@ -1171,6 +1206,23 @@
"smithy.api#documentation": "<p>Contains the JSON-formatted string returned by the API invoked by the code interpreter.</p>"
}
},
"com.amazonaws.bedrockagentruntime#ConfirmationState": {
"type": "enum",
"members": {
"CONFIRM": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "CONFIRM"
}
},
"DENY": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "DENY"
}
}
}
},
"com.amazonaws.bedrockagentruntime#ConflictException": {
"type": "structure",
"members": {
Expand Down Expand Up @@ -1900,6 +1952,12 @@
"traits": {
"smithy.api#documentation": "<p>The name of the function.</p>"
}
},
"actionInvocationType": {
"target": "com.amazonaws.bedrockagentruntime#ActionInvocationType",
"traits": {
"smithy.api#documentation": "<p>Contains information about the function to invoke,</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -1948,6 +2006,12 @@
"smithy.api#required": {}
}
},
"confirmationState": {
"target": "com.amazonaws.bedrockagentruntime#ConfirmationState",
"traits": {
"smithy.api#documentation": "<p>Contains the user confirmation information about the function that was called.</p>"
}
},
"function": {
"target": "smithy.api#String",
"traits": {
Expand Down

0 comments on commit 60d1a5a

Please sign in to comment.