@aws-sdk/client-bedrock-agent-runtime 3.696.0 → 3.699.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist-cjs/index.js +704 -1
- package/dist-es/BedrockAgentRuntime.js +4 -0
- package/dist-es/commands/InvokeInlineAgentCommand.js +27 -0
- package/dist-es/commands/OptimizePromptCommand.js +27 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +285 -0
- package/dist-es/protocols/Aws_restJson1.js +286 -0
- package/dist-types/BedrockAgentRuntime.d.ts +14 -0
- package/dist-types/BedrockAgentRuntimeClient.d.ts +4 -2
- package/dist-types/commands/InvokeAgentCommand.d.ts +6 -6
- package/dist-types/commands/InvokeFlowCommand.d.ts +1 -1
- package/dist-types/commands/InvokeInlineAgentCommand.d.ts +755 -0
- package/dist-types/commands/OptimizePromptCommand.d.ts +125 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +1458 -65
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +34 -0
- package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +12 -0
- package/dist-types/ts3.4/commands/InvokeInlineAgentCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/OptimizePromptCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +687 -2
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
- package/package.json +4 -4
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import { BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockAgentRuntimeClient";
|
|
4
|
+
import { OptimizePromptRequest, OptimizePromptResponse } from "../models/models_0";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link OptimizePromptCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface OptimizePromptCommandInput extends OptimizePromptRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link OptimizePromptCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface OptimizePromptCommandOutput extends OptimizePromptResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const OptimizePromptCommand_base: {
|
|
25
|
+
new (input: OptimizePromptCommandInput): import("@smithy/smithy-client").CommandImpl<OptimizePromptCommandInput, OptimizePromptCommandOutput, BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: OptimizePromptCommandInput): import("@smithy/smithy-client").CommandImpl<OptimizePromptCommandInput, OptimizePromptCommandOutput, BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Optimizes a prompt for the task that you specify. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-optimize.html">Optimize a prompt</a> in the <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html">Amazon Bedrock User Guide</a>.</p>
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { BedrockAgentRuntimeClient, OptimizePromptCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import
|
|
35
|
+
* // const { BedrockAgentRuntimeClient, OptimizePromptCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import
|
|
36
|
+
* const client = new BedrockAgentRuntimeClient(config);
|
|
37
|
+
* const input = { // OptimizePromptRequest
|
|
38
|
+
* input: { // InputPrompt Union: only one key present
|
|
39
|
+
* textPrompt: { // TextPrompt
|
|
40
|
+
* text: "STRING_VALUE", // required
|
|
41
|
+
* },
|
|
42
|
+
* },
|
|
43
|
+
* targetModelId: "STRING_VALUE", // required
|
|
44
|
+
* };
|
|
45
|
+
* const command = new OptimizePromptCommand(input);
|
|
46
|
+
* const response = await client.send(command);
|
|
47
|
+
* // { // OptimizePromptResponse
|
|
48
|
+
* // optimizedPrompt: { // OptimizedPromptStream Union: only one key present
|
|
49
|
+
* // optimizedPromptEvent: { // OptimizedPromptEvent
|
|
50
|
+
* // optimizedPrompt: { // OptimizedPrompt Union: only one key present
|
|
51
|
+
* // textPrompt: { // TextPrompt
|
|
52
|
+
* // text: "STRING_VALUE", // required
|
|
53
|
+
* // },
|
|
54
|
+
* // },
|
|
55
|
+
* // },
|
|
56
|
+
* // analyzePromptEvent: { // AnalyzePromptEvent
|
|
57
|
+
* // message: "STRING_VALUE",
|
|
58
|
+
* // },
|
|
59
|
+
* // internalServerException: { // InternalServerException
|
|
60
|
+
* // message: "STRING_VALUE",
|
|
61
|
+
* // },
|
|
62
|
+
* // throttlingException: { // ThrottlingException
|
|
63
|
+
* // message: "STRING_VALUE",
|
|
64
|
+
* // },
|
|
65
|
+
* // validationException: { // ValidationException
|
|
66
|
+
* // message: "STRING_VALUE",
|
|
67
|
+
* // },
|
|
68
|
+
* // dependencyFailedException: { // DependencyFailedException
|
|
69
|
+
* // message: "STRING_VALUE",
|
|
70
|
+
* // resourceName: "STRING_VALUE",
|
|
71
|
+
* // },
|
|
72
|
+
* // accessDeniedException: { // AccessDeniedException
|
|
73
|
+
* // message: "STRING_VALUE",
|
|
74
|
+
* // },
|
|
75
|
+
* // badGatewayException: { // BadGatewayException
|
|
76
|
+
* // message: "STRING_VALUE",
|
|
77
|
+
* // resourceName: "STRING_VALUE",
|
|
78
|
+
* // },
|
|
79
|
+
* // },
|
|
80
|
+
* // };
|
|
81
|
+
*
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* @param OptimizePromptCommandInput - {@link OptimizePromptCommandInput}
|
|
85
|
+
* @returns {@link OptimizePromptCommandOutput}
|
|
86
|
+
* @see {@link OptimizePromptCommandInput} for command's `input` shape.
|
|
87
|
+
* @see {@link OptimizePromptCommandOutput} for command's `response` shape.
|
|
88
|
+
* @see {@link BedrockAgentRuntimeClientResolvedConfig | config} for BedrockAgentRuntimeClient's `config` shape.
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
91
|
+
* <p>The request is denied because of missing access permissions. Check your permissions and retry your request.</p>
|
|
92
|
+
*
|
|
93
|
+
* @throws {@link BadGatewayException} (server fault)
|
|
94
|
+
* <p>There was an issue with a dependency due to a server issue. Retry your request.</p>
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link DependencyFailedException} (client fault)
|
|
97
|
+
* <p>There was an issue with a dependency. Check the resource configurations and retry the request.</p>
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link InternalServerException} (server fault)
|
|
100
|
+
* <p>An internal server error occurred. Retry your request.</p>
|
|
101
|
+
*
|
|
102
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
103
|
+
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
|
|
104
|
+
*
|
|
105
|
+
* @throws {@link ValidationException} (client fault)
|
|
106
|
+
* <p>Input validation failed. Check your request parameters and retry the request.</p>
|
|
107
|
+
*
|
|
108
|
+
* @throws {@link BedrockAgentRuntimeServiceException}
|
|
109
|
+
* <p>Base exception class for all service exceptions from BedrockAgentRuntime service.</p>
|
|
110
|
+
*
|
|
111
|
+
* @public
|
|
112
|
+
*/
|
|
113
|
+
export declare class OptimizePromptCommand extends OptimizePromptCommand_base {
|
|
114
|
+
/** @internal type navigation helper, not in runtime. */
|
|
115
|
+
protected static __types: {
|
|
116
|
+
api: {
|
|
117
|
+
input: OptimizePromptRequest;
|
|
118
|
+
output: OptimizePromptResponse;
|
|
119
|
+
};
|
|
120
|
+
sdk: {
|
|
121
|
+
input: OptimizePromptCommandInput;
|
|
122
|
+
output: OptimizePromptCommandOutput;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
}
|
|
@@ -2,5 +2,7 @@ export * from "./DeleteAgentMemoryCommand";
|
|
|
2
2
|
export * from "./GetAgentMemoryCommand";
|
|
3
3
|
export * from "./InvokeAgentCommand";
|
|
4
4
|
export * from "./InvokeFlowCommand";
|
|
5
|
+
export * from "./InvokeInlineAgentCommand";
|
|
6
|
+
export * from "./OptimizePromptCommand";
|
|
5
7
|
export * from "./RetrieveAndGenerateCommand";
|
|
6
8
|
export * from "./RetrieveCommand";
|