Skip to content

Commit

Permalink
feat(client-bedrock-agent): Add support for the prompt caching featur…
Browse files Browse the repository at this point in the history
…e for Bedrock Prompt Management
  • Loading branch information
awstools committed Jan 27, 2025
1 parent 3488ae9 commit e631752
Show file tree
Hide file tree
Showing 21 changed files with 669 additions and 152 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export interface CreateAgentAliasCommandOutput extends CreateAgentAliasResponse,
* // startDate: new Date("TIMESTAMP"),
* // },
* // ],
* // agentAliasStatus: "CREATING" || "PREPARED" || "FAILED" || "UPDATING" || "DELETING", // required
* // agentAliasStatus: "CREATING" || "PREPARED" || "FAILED" || "UPDATING" || "DELETING" || "DISSOCIATED", // required
* // failureReasons: [ // FailureReasons
* // "STRING_VALUE",
* // ],
Expand Down
16 changes: 16 additions & 0 deletions clients/client-bedrock-agent/src/commands/CreateFlowCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
* templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
* text: { // TextPromptTemplateConfiguration
* text: "STRING_VALUE", // required
* cachePoint: { // CachePointBlock
* type: "default", // required
* },
* inputVariables: [ // PromptInputVariablesList
* { // PromptInputVariable
* name: "STRING_VALUE",
Expand All @@ -96,13 +99,17 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
* content: [ // ContentBlocks // required
* { // ContentBlock Union: only one key present
* text: "STRING_VALUE",
* cachePoint: {
* type: "default", // required
* },
* },
* ],
* },
* ],
* system: [ // SystemContentBlocks
* { // SystemContentBlock Union: only one key present
* text: "STRING_VALUE",
* cachePoint: "<CachePointBlock>",
* },
* ],
* inputVariables: [
Expand All @@ -120,6 +127,7 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
* json: "DOCUMENT_VALUE",
* },
* },
* cachePoint: "<CachePointBlock>",
* },
* ],
* toolChoice: { // ToolChoice Union: only one key present
Expand Down Expand Up @@ -263,6 +271,9 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
* // text: { // TextPromptTemplateConfiguration
* // text: "STRING_VALUE", // required
* // cachePoint: { // CachePointBlock
* // type: "default", // required
* // },
* // inputVariables: [ // PromptInputVariablesList
* // { // PromptInputVariable
* // name: "STRING_VALUE",
Expand All @@ -276,13 +287,17 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
* // content: [ // ContentBlocks // required
* // { // ContentBlock Union: only one key present
* // text: "STRING_VALUE",
* // cachePoint: {
* // type: "default", // required
* // },
* // },
* // ],
* // },
* // ],
* // system: [ // SystemContentBlocks
* // { // SystemContentBlock Union: only one key present
* // text: "STRING_VALUE",
* // cachePoint: "<CachePointBlock>",
* // },
* // ],
* // inputVariables: [
Expand All @@ -300,6 +315,7 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
* // json: "DOCUMENT_VALUE",
* // },
* // },
* // cachePoint: "<CachePointBlock>",
* // },
* // ],
* // toolChoice: { // ToolChoice Union: only one key present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ export interface CreateFlowVersionCommandOutput extends CreateFlowVersionRespons
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
* // text: { // TextPromptTemplateConfiguration
* // text: "STRING_VALUE", // required
* // cachePoint: { // CachePointBlock
* // type: "default", // required
* // },
* // inputVariables: [ // PromptInputVariablesList
* // { // PromptInputVariable
* // name: "STRING_VALUE",
Expand All @@ -107,13 +110,17 @@ export interface CreateFlowVersionCommandOutput extends CreateFlowVersionRespons
* // content: [ // ContentBlocks // required
* // { // ContentBlock Union: only one key present
* // text: "STRING_VALUE",
* // cachePoint: {
* // type: "default", // required
* // },
* // },
* // ],
* // },
* // ],
* // system: [ // SystemContentBlocks
* // { // SystemContentBlock Union: only one key present
* // text: "STRING_VALUE",
* // cachePoint: "<CachePointBlock>",
* // },
* // ],
* // inputVariables: [
Expand All @@ -131,6 +138,7 @@ export interface CreateFlowVersionCommandOutput extends CreateFlowVersionRespons
* // json: "DOCUMENT_VALUE",
* // },
* // },
* // cachePoint: "<CachePointBlock>",
* // },
* // ],
* // toolChoice: { // ToolChoice Union: only one key present
Expand Down
16 changes: 16 additions & 0 deletions clients/client-bedrock-agent/src/commands/CreatePromptCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ export interface CreatePromptCommandOutput extends CreatePromptResponse, __Metad
* templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
* text: { // TextPromptTemplateConfiguration
* text: "STRING_VALUE", // required
* cachePoint: { // CachePointBlock
* type: "default", // required
* },
* inputVariables: [ // PromptInputVariablesList
* { // PromptInputVariable
* name: "STRING_VALUE",
Expand All @@ -65,13 +68,17 @@ export interface CreatePromptCommandOutput extends CreatePromptResponse, __Metad
* content: [ // ContentBlocks // required
* { // ContentBlock Union: only one key present
* text: "STRING_VALUE",
* cachePoint: {
* type: "default", // required
* },
* },
* ],
* },
* ],
* system: [ // SystemContentBlocks
* { // SystemContentBlock Union: only one key present
* text: "STRING_VALUE",
* cachePoint: "<CachePointBlock>",
* },
* ],
* inputVariables: [
Expand All @@ -89,6 +96,7 @@ export interface CreatePromptCommandOutput extends CreatePromptResponse, __Metad
* json: "DOCUMENT_VALUE",
* },
* },
* cachePoint: "<CachePointBlock>",
* },
* ],
* toolChoice: { // ToolChoice Union: only one key present
Expand Down Expand Up @@ -145,6 +153,9 @@ export interface CreatePromptCommandOutput extends CreatePromptResponse, __Metad
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
* // text: { // TextPromptTemplateConfiguration
* // text: "STRING_VALUE", // required
* // cachePoint: { // CachePointBlock
* // type: "default", // required
* // },
* // inputVariables: [ // PromptInputVariablesList
* // { // PromptInputVariable
* // name: "STRING_VALUE",
Expand All @@ -158,13 +169,17 @@ export interface CreatePromptCommandOutput extends CreatePromptResponse, __Metad
* // content: [ // ContentBlocks // required
* // { // ContentBlock Union: only one key present
* // text: "STRING_VALUE",
* // cachePoint: {
* // type: "default", // required
* // },
* // },
* // ],
* // },
* // ],
* // system: [ // SystemContentBlocks
* // { // SystemContentBlock Union: only one key present
* // text: "STRING_VALUE",
* // cachePoint: "<CachePointBlock>",
* // },
* // ],
* // inputVariables: [
Expand All @@ -182,6 +197,7 @@ export interface CreatePromptCommandOutput extends CreatePromptResponse, __Metad
* // json: "DOCUMENT_VALUE",
* // },
* // },
* // cachePoint: "<CachePointBlock>",
* // },
* // ],
* // toolChoice: { // ToolChoice Union: only one key present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ export interface CreatePromptVersionCommandOutput extends CreatePromptVersionRes
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
* // text: { // TextPromptTemplateConfiguration
* // text: "STRING_VALUE", // required
* // cachePoint: { // CachePointBlock
* // type: "default", // required
* // },
* // inputVariables: [ // PromptInputVariablesList
* // { // PromptInputVariable
* // name: "STRING_VALUE",
Expand All @@ -74,13 +77,17 @@ export interface CreatePromptVersionCommandOutput extends CreatePromptVersionRes
* // content: [ // ContentBlocks // required
* // { // ContentBlock Union: only one key present
* // text: "STRING_VALUE",
* // cachePoint: {
* // type: "default", // required
* // },
* // },
* // ],
* // },
* // ],
* // system: [ // SystemContentBlocks
* // { // SystemContentBlock Union: only one key present
* // text: "STRING_VALUE",
* // cachePoint: "<CachePointBlock>",
* // },
* // ],
* // inputVariables: [
Expand All @@ -98,6 +105,7 @@ export interface CreatePromptVersionCommandOutput extends CreatePromptVersionRes
* // json: "DOCUMENT_VALUE",
* // },
* // },
* // cachePoint: "<CachePointBlock>",
* // },
* // ],
* // toolChoice: { // ToolChoice Union: only one key present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface DeleteAgentAliasCommandOutput extends DeleteAgentAliasResponse,
* // { // DeleteAgentAliasResponse
* // agentId: "STRING_VALUE", // required
* // agentAliasId: "STRING_VALUE", // required
* // agentAliasStatus: "CREATING" || "PREPARED" || "FAILED" || "UPDATING" || "DELETING", // required
* // agentAliasStatus: "CREATING" || "PREPARED" || "FAILED" || "UPDATING" || "DELETING" || "DISSOCIATED", // required
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { BedrockAgentClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockAgentClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { DeleteKnowledgeBaseDocumentsRequest, DeleteKnowledgeBaseDocumentsResponse } from "../models/models_0";
import { DeleteKnowledgeBaseDocumentsRequest } from "../models/models_0";
import { DeleteKnowledgeBaseDocumentsResponse } from "../models/models_1";
import {
de_DeleteKnowledgeBaseDocumentsCommand,
se_DeleteKnowledgeBaseDocumentsCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export interface GetAgentAliasCommandOutput extends GetAgentAliasResponse, __Met
* // startDate: new Date("TIMESTAMP"),
* // },
* // ],
* // agentAliasStatus: "CREATING" || "PREPARED" || "FAILED" || "UPDATING" || "DELETING", // required
* // agentAliasStatus: "CREATING" || "PREPARED" || "FAILED" || "UPDATING" || "DELETING" || "DISSOCIATED", // required
* // failureReasons: [ // FailureReasons
* // "STRING_VALUE",
* // ],
Expand Down
18 changes: 17 additions & 1 deletion clients/client-bedrock-agent/src/commands/GetFlowCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ export interface GetFlowCommandOutput extends GetFlowResponse, __MetadataBearer
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
* // text: { // TextPromptTemplateConfiguration
* // text: "STRING_VALUE", // required
* // cachePoint: { // CachePointBlock
* // type: "default", // required
* // },
* // inputVariables: [ // PromptInputVariablesList
* // { // PromptInputVariable
* // name: "STRING_VALUE",
Expand All @@ -102,13 +105,17 @@ export interface GetFlowCommandOutput extends GetFlowResponse, __MetadataBearer
* // content: [ // ContentBlocks // required
* // { // ContentBlock Union: only one key present
* // text: "STRING_VALUE",
* // cachePoint: {
* // type: "default", // required
* // },
* // },
* // ],
* // },
* // ],
* // system: [ // SystemContentBlocks
* // { // SystemContentBlock Union: only one key present
* // text: "STRING_VALUE",
* // cachePoint: "<CachePointBlock>",
* // },
* // ],
* // inputVariables: [
Expand All @@ -126,6 +133,7 @@ export interface GetFlowCommandOutput extends GetFlowResponse, __MetadataBearer
* // json: "DOCUMENT_VALUE",
* // },
* // },
* // cachePoint: "<CachePointBlock>",
* // },
* // ],
* // toolChoice: { // ToolChoice Union: only one key present
Expand Down Expand Up @@ -301,8 +309,16 @@ export interface GetFlowCommandOutput extends GetFlowResponse, __MetadataBearer
* // connection: "STRING_VALUE", // required
* // },
* // unspecified: {},
* // unknownNodeInput: { // UnknownNodeInputFlowValidationDetails
* // node: "STRING_VALUE", // required
* // input: "STRING_VALUE", // required
* // },
* // unknownNodeOutput: { // UnknownNodeOutputFlowValidationDetails
* // node: "STRING_VALUE", // required
* // output: "STRING_VALUE", // required
* // },
* // },
* // type: "CyclicConnection" || "DuplicateConnections" || "DuplicateConditionExpression" || "UnreachableNode" || "UnknownConnectionSource" || "UnknownConnectionSourceOutput" || "UnknownConnectionTarget" || "UnknownConnectionTargetInput" || "UnknownConnectionCondition" || "MalformedConditionExpression" || "MalformedNodeInputExpression" || "MismatchedNodeInputType" || "MismatchedNodeOutputType" || "IncompatibleConnectionDataType" || "MissingConnectionConfiguration" || "MissingDefaultCondition" || "MissingEndingNodes" || "MissingNodeConfiguration" || "MissingNodeInput" || "MissingNodeOutput" || "MissingStartingNodes" || "MultipleNodeInputConnections" || "UnfulfilledNodeInput" || "UnsatisfiedConnectionConditions" || "Unspecified",
* // type: "CyclicConnection" || "DuplicateConnections" || "DuplicateConditionExpression" || "UnreachableNode" || "UnknownConnectionSource" || "UnknownConnectionSourceOutput" || "UnknownConnectionTarget" || "UnknownConnectionTargetInput" || "UnknownConnectionCondition" || "MalformedConditionExpression" || "MalformedNodeInputExpression" || "MismatchedNodeInputType" || "MismatchedNodeOutputType" || "IncompatibleConnectionDataType" || "MissingConnectionConfiguration" || "MissingDefaultCondition" || "MissingEndingNodes" || "MissingNodeConfiguration" || "MissingNodeInput" || "MissingNodeOutput" || "MissingStartingNodes" || "MultipleNodeInputConnections" || "UnfulfilledNodeInput" || "UnsatisfiedConnectionConditions" || "Unspecified" || "UnknownNodeInput" || "UnknownNodeOutput",
* // },
* // ],
* // };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ export interface GetFlowVersionCommandOutput extends GetFlowVersionResponse, __M
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
* // text: { // TextPromptTemplateConfiguration
* // text: "STRING_VALUE", // required
* // cachePoint: { // CachePointBlock
* // type: "default", // required
* // },
* // inputVariables: [ // PromptInputVariablesList
* // { // PromptInputVariable
* // name: "STRING_VALUE",
Expand All @@ -106,13 +109,17 @@ export interface GetFlowVersionCommandOutput extends GetFlowVersionResponse, __M
* // content: [ // ContentBlocks // required
* // { // ContentBlock Union: only one key present
* // text: "STRING_VALUE",
* // cachePoint: {
* // type: "default", // required
* // },
* // },
* // ],
* // },
* // ],
* // system: [ // SystemContentBlocks
* // { // SystemContentBlock Union: only one key present
* // text: "STRING_VALUE",
* // cachePoint: "<CachePointBlock>",
* // },
* // ],
* // inputVariables: [
Expand All @@ -130,6 +137,7 @@ export interface GetFlowVersionCommandOutput extends GetFlowVersionResponse, __M
* // json: "DOCUMENT_VALUE",
* // },
* // },
* // cachePoint: "<CachePointBlock>",
* // },
* // ],
* // toolChoice: { // ToolChoice Union: only one key present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { BedrockAgentClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockAgentClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { GetKnowledgeBaseDocumentsRequest, GetKnowledgeBaseDocumentsResponse } from "../models/models_0";
import { GetKnowledgeBaseDocumentsRequest, GetKnowledgeBaseDocumentsResponse } from "../models/models_1";
import { de_GetKnowledgeBaseDocumentsCommand, se_GetKnowledgeBaseDocumentsCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Loading

0 comments on commit e631752

Please sign in to comment.