@aws-sdk/client-bedrock-runtime
Advanced tools
Comparing version 3.686.0 to 3.687.0
@@ -5,2 +5,3 @@ import { getEndpointPlugin } from "@smithy/middleware-endpoint"; | ||
import { commonParams } from "../endpoint/EndpointParameters"; | ||
import { ConverseRequestFilterSensitiveLog } from "../models/models_0"; | ||
import { de_ConverseCommand, se_ConverseCommand } from "../protocols/Aws_restJson1"; | ||
@@ -19,3 +20,3 @@ export { $Command }; | ||
.n("BedrockRuntimeClient", "ConverseCommand") | ||
.f(void 0, void 0) | ||
.f(ConverseRequestFilterSensitiveLog, void 0) | ||
.ser(se_ConverseCommand) | ||
@@ -22,0 +23,0 @@ .de(de_ConverseCommand) |
@@ -5,3 +5,3 @@ import { getEndpointPlugin } from "@smithy/middleware-endpoint"; | ||
import { commonParams } from "../endpoint/EndpointParameters"; | ||
import { ConverseStreamResponseFilterSensitiveLog, } from "../models/models_0"; | ||
import { ConverseStreamRequestFilterSensitiveLog, ConverseStreamResponseFilterSensitiveLog, } from "../models/models_0"; | ||
import { de_ConverseStreamCommand, se_ConverseStreamCommand } from "../protocols/Aws_restJson1"; | ||
@@ -24,3 +24,3 @@ export { $Command }; | ||
.n("BedrockRuntimeClient", "ConverseStreamCommand") | ||
.f(void 0, ConverseStreamResponseFilterSensitiveLog) | ||
.f(ConverseStreamRequestFilterSensitiveLog, ConverseStreamResponseFilterSensitiveLog) | ||
.ser(se_ConverseStreamCommand) | ||
@@ -27,0 +27,0 @@ .de(de_ConverseStreamCommand) |
@@ -266,2 +266,10 @@ import { SENSITIVE_STRING } from "@smithy/smithy-client"; | ||
}; | ||
export var PromptVariableValues; | ||
(function (PromptVariableValues) { | ||
PromptVariableValues.visit = (value, visitor) => { | ||
if (value.text !== undefined) | ||
return visitor.text(value.text); | ||
return visitor._(value.$unknown[0], value.$unknown[1]); | ||
}; | ||
})(PromptVariableValues || (PromptVariableValues = {})); | ||
export var SystemContentBlock; | ||
@@ -460,2 +468,16 @@ (function (SystemContentBlock) { | ||
})(ResponseStream || (ResponseStream = {})); | ||
export const ConverseRequestFilterSensitiveLog = (obj) => ({ | ||
...obj, | ||
...(obj.messages && { messages: obj.messages.map((item) => item) }), | ||
...(obj.system && { system: obj.system.map((item) => item) }), | ||
...(obj.toolConfig && { toolConfig: obj.toolConfig }), | ||
...(obj.promptVariables && { promptVariables: SENSITIVE_STRING }), | ||
}); | ||
export const ConverseStreamRequestFilterSensitiveLog = (obj) => ({ | ||
...obj, | ||
...(obj.messages && { messages: obj.messages.map((item) => item) }), | ||
...(obj.system && { system: obj.system.map((item) => item) }), | ||
...(obj.toolConfig && { toolConfig: obj.toolConfig }), | ||
...(obj.promptVariables && { promptVariables: SENSITIVE_STRING }), | ||
}); | ||
export const ConverseStreamOutputFilterSensitiveLog = (obj) => { | ||
@@ -462,0 +484,0 @@ if (obj.messageStart !== undefined) |
@@ -36,2 +36,3 @@ import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core"; | ||
messages: (_) => se_Messages(_, context), | ||
promptVariables: (_) => _json(_), | ||
system: (_) => _json(_), | ||
@@ -57,2 +58,3 @@ toolConfig: (_) => se_ToolConfiguration(_, context), | ||
messages: (_) => se_Messages(_, context), | ||
promptVariables: (_) => _json(_), | ||
system: (_) => _json(_), | ||
@@ -59,0 +61,0 @@ toolConfig: (_) => se_ToolConfiguration(_, context), |
@@ -36,2 +36,4 @@ import { Command as $Command } from "@smithy/smithy-client"; | ||
* <p>Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.</p> | ||
* <p>You can submit a prompt by including it in the <code>messages</code> field, specifying the <code>modelId</code> of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case.</p> | ||
* <p>You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the <code>promptVariables</code> field. You can append more messages to the prompt by using the <code>messages</code> field. If you use a prompt from Prompt management, you can't include the following fields in the request: <code>additionalModelRequestFields</code>, <code>inferenceConfig</code>, <code>system</code>, or <code>toolConfig</code>. Instead, these fields must be defined through Prompt management. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html">Use a prompt from Prompt management</a>.</p> | ||
* <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. | ||
@@ -52,3 +54,3 @@ * To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. | ||
* modelId: "STRING_VALUE", // required | ||
* messages: [ // Messages // required | ||
* messages: [ // Messages | ||
* { // Message | ||
@@ -159,2 +161,7 @@ * role: "user" || "assistant", // required | ||
* additionalModelRequestFields: "DOCUMENT_VALUE", | ||
* promptVariables: { // PromptVariableMap | ||
* "<keys>": { // PromptVariableValues Union: only one key present | ||
* text: "STRING_VALUE", | ||
* }, | ||
* }, | ||
* additionalModelResponseFieldPaths: [ // AdditionalModelResponseFieldPaths | ||
@@ -161,0 +168,0 @@ * "STRING_VALUE", |
@@ -42,2 +42,4 @@ import { Command as $Command } from "@smithy/smithy-client"; | ||
* <p>Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.</p> | ||
* <p>You can submit a prompt by including it in the <code>messages</code> field, specifying the <code>modelId</code> of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case.</p> | ||
* <p>You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the <code>promptVariables</code> field. You can append more messages to the prompt by using the <code>messages</code> field. If you use a prompt from Prompt management, you can't include the following fields in the request: <code>additionalModelRequestFields</code>, <code>inferenceConfig</code>, <code>system</code>, or <code>toolConfig</code>. Instead, these fields must be defined through Prompt management. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html">Use a prompt from Prompt management</a>.</p> | ||
* <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. | ||
@@ -58,3 +60,3 @@ * To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. | ||
* modelId: "STRING_VALUE", // required | ||
* messages: [ // Messages // required | ||
* messages: [ // Messages | ||
* { // Message | ||
@@ -166,2 +168,7 @@ * role: "user" || "assistant", // required | ||
* additionalModelRequestFields: "DOCUMENT_VALUE", | ||
* promptVariables: { // PromptVariableMap | ||
* "<keys>": { // PromptVariableValues Union: only one key present | ||
* text: "STRING_VALUE", | ||
* }, | ||
* }, | ||
* additionalModelResponseFieldPaths: [ // AdditionalModelResponseFieldPaths | ||
@@ -168,0 +175,0 @@ * "STRING_VALUE", |
@@ -15,3 +15,3 @@ import { Command as $Command } from "@smithy/smithy-client"; | ||
export type InvokeModelCommandInputType = Omit<InvokeModelRequest, "body"> & { | ||
body: BlobPayloadInputTypes; | ||
body?: BlobPayloadInputTypes; | ||
}; | ||
@@ -56,3 +56,3 @@ /** | ||
* const input = { // InvokeModelRequest | ||
* body: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required | ||
* body: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") | ||
* contentType: "STRING_VALUE", | ||
@@ -59,0 +59,0 @@ * accept: "STRING_VALUE", |
@@ -14,3 +14,3 @@ import { Command as $Command } from "@smithy/smithy-client"; | ||
export type InvokeModelWithResponseStreamCommandInputType = Omit<InvokeModelWithResponseStreamRequest, "body"> & { | ||
body: BlobPayloadInputTypes; | ||
body?: BlobPayloadInputTypes; | ||
}; | ||
@@ -54,3 +54,3 @@ /** | ||
* const input = { // InvokeModelWithResponseStreamRequest | ||
* body: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required | ||
* body: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") | ||
* contentType: "STRING_VALUE", | ||
@@ -57,0 +57,0 @@ * accept: "STRING_VALUE", |
@@ -19,3 +19,3 @@ import { Command as $Command } from "@smithy/smithy-client"; | ||
> & { | ||
body: BlobPayloadInputTypes; | ||
body?: BlobPayloadInputTypes; | ||
}; | ||
@@ -22,0 +22,0 @@ export interface InvokeModelCommandInput extends InvokeModelCommandInputType {} |
@@ -21,3 +21,3 @@ import { Command as $Command } from "@smithy/smithy-client"; | ||
> & { | ||
body: BlobPayloadInputTypes; | ||
body?: BlobPayloadInputTypes; | ||
}; | ||
@@ -24,0 +24,0 @@ export interface InvokeModelWithResponseStreamCommandInput |
@@ -561,2 +561,20 @@ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; | ||
} | ||
export type PromptVariableValues = | ||
| PromptVariableValues.TextMember | ||
| PromptVariableValues.$UnknownMember; | ||
export declare namespace PromptVariableValues { | ||
interface TextMember { | ||
text: string; | ||
$unknown?: never; | ||
} | ||
interface $UnknownMember { | ||
text?: never; | ||
$unknown: [string, any]; | ||
} | ||
interface Visitor<T> { | ||
text: (value: string) => T; | ||
_: (name: string, value: any) => T; | ||
} | ||
const visit: <T>(value: PromptVariableValues, visitor: Visitor<T>) => T; | ||
} | ||
export type SystemContentBlock = | ||
@@ -677,3 +695,3 @@ | SystemContentBlock.GuardContentMember | ||
modelId: string | undefined; | ||
messages: Message[] | undefined; | ||
messages?: Message[]; | ||
system?: SystemContentBlock[]; | ||
@@ -684,2 +702,3 @@ inferenceConfig?: InferenceConfiguration; | ||
additionalModelRequestFields?: __DocumentType; | ||
promptVariables?: Record<string, PromptVariableValues>; | ||
additionalModelResponseFieldPaths?: string[]; | ||
@@ -783,3 +802,3 @@ } | ||
modelId: string | undefined; | ||
messages: Message[] | undefined; | ||
messages?: Message[]; | ||
system?: SystemContentBlock[]; | ||
@@ -790,2 +809,3 @@ inferenceConfig?: InferenceConfiguration; | ||
additionalModelRequestFields?: __DocumentType; | ||
promptVariables?: Record<string, PromptVariableValues>; | ||
additionalModelResponseFieldPaths?: string[]; | ||
@@ -1090,3 +1110,3 @@ } | ||
export interface InvokeModelRequest { | ||
body: Uint8Array | undefined; | ||
body?: Uint8Array; | ||
contentType?: string; | ||
@@ -1104,3 +1124,3 @@ accept?: string; | ||
export interface InvokeModelWithResponseStreamRequest { | ||
body: Uint8Array | undefined; | ||
body?: Uint8Array; | ||
contentType?: string; | ||
@@ -1222,2 +1242,8 @@ accept?: string; | ||
} | ||
export declare const ConverseRequestFilterSensitiveLog: ( | ||
obj: ConverseRequest | ||
) => any; | ||
export declare const ConverseStreamRequestFilterSensitiveLog: ( | ||
obj: ConverseStreamRequest | ||
) => any; | ||
export declare const ConverseStreamOutputFilterSensitiveLog: ( | ||
@@ -1224,0 +1250,0 @@ obj: ConverseStreamOutput |
{ | ||
"name": "@aws-sdk/client-bedrock-runtime", | ||
"description": "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native", | ||
"version": "3.686.0", | ||
"version": "3.687.0", | ||
"scripts": { | ||
@@ -23,10 +23,10 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"@aws-crypto/sha256-js": "5.2.0", | ||
"@aws-sdk/client-sso-oidc": "3.686.0", | ||
"@aws-sdk/client-sts": "3.686.0", | ||
"@aws-sdk/client-sso-oidc": "3.687.0", | ||
"@aws-sdk/client-sts": "3.687.0", | ||
"@aws-sdk/core": "3.686.0", | ||
"@aws-sdk/credential-provider-node": "3.686.0", | ||
"@aws-sdk/credential-provider-node": "3.687.0", | ||
"@aws-sdk/middleware-host-header": "3.686.0", | ||
"@aws-sdk/middleware-logger": "3.686.0", | ||
"@aws-sdk/middleware-recursion-detection": "3.686.0", | ||
"@aws-sdk/middleware-user-agent": "3.686.0", | ||
"@aws-sdk/middleware-user-agent": "3.687.0", | ||
"@aws-sdk/region-config-resolver": "3.686.0", | ||
@@ -36,3 +36,3 @@ "@aws-sdk/types": "3.686.0", | ||
"@aws-sdk/util-user-agent-browser": "3.686.0", | ||
"@aws-sdk/util-user-agent-node": "3.686.0", | ||
"@aws-sdk/util-user-agent-node": "3.687.0", | ||
"@smithy/config-resolver": "^3.0.10", | ||
@@ -39,0 +39,0 @@ "@smithy/core": "^2.5.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
476701
11361
+ Added@aws-sdk/client-sso@3.687.0(transitive)
+ Added@aws-sdk/client-sso-oidc@3.687.0(transitive)
+ Added@aws-sdk/client-sts@3.687.0(transitive)
+ Added@aws-sdk/credential-provider-ini@3.687.0(transitive)
+ Added@aws-sdk/credential-provider-node@3.687.0(transitive)
+ Added@aws-sdk/credential-provider-sso@3.687.0(transitive)
+ Added@aws-sdk/middleware-user-agent@3.687.0(transitive)
+ Added@aws-sdk/util-user-agent-node@3.687.0(transitive)
- Removed@aws-sdk/client-sso@3.686.0(transitive)
- Removed@aws-sdk/client-sso-oidc@3.686.0(transitive)
- Removed@aws-sdk/client-sts@3.686.0(transitive)
- Removed@aws-sdk/credential-provider-ini@3.686.0(transitive)
- Removed@aws-sdk/credential-provider-node@3.686.0(transitive)
- Removed@aws-sdk/credential-provider-sso@3.686.0(transitive)
- Removed@aws-sdk/middleware-user-agent@3.686.0(transitive)
- Removed@aws-sdk/util-user-agent-node@3.686.0(transitive)
Updated@aws-sdk/client-sts@3.687.0