New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/client-bedrock-agent-runtime

Package Overview
Dependencies
Maintainers
5
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-bedrock-agent-runtime - npm Package Compare versions

Comparing version 3.701.0 to 3.703.0

dist-es/commands/RerankCommand.js

4

dist-es/BedrockAgentRuntime.js

@@ -9,3 +9,5 @@ import { createAggregatedClient } from "@smithy/smithy-client";

import { OptimizePromptCommand, } from "./commands/OptimizePromptCommand";
import { RerankCommand } from "./commands/RerankCommand";
import { RetrieveAndGenerateCommand, } from "./commands/RetrieveAndGenerateCommand";
import { RetrieveAndGenerateStreamCommand, } from "./commands/RetrieveAndGenerateStreamCommand";
import { RetrieveCommand } from "./commands/RetrieveCommand";

@@ -19,4 +21,6 @@ const commands = {

OptimizePromptCommand,
RerankCommand,
RetrieveCommand,
RetrieveAndGenerateCommand,
RetrieveAndGenerateStreamCommand,
};

@@ -23,0 +27,0 @@ export class BedrockAgentRuntime extends BedrockAgentRuntimeClient {

@@ -7,3 +7,5 @@ export * from "./DeleteAgentMemoryCommand";

export * from "./OptimizePromptCommand";
export * from "./RerankCommand";
export * from "./RetrieveAndGenerateCommand";
export * from "./RetrieveAndGenerateStreamCommand";
export * from "./RetrieveCommand";
export * from "./GetAgentMemoryPaginator";
export * from "./Interfaces";
export * from "./RerankPaginator";
export * from "./RetrievePaginator";

@@ -111,2 +111,18 @@ import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";

};
export const se_RerankCommand = async (input, context) => {
const b = rb(input, context);
const headers = {
"content-type": "application/json",
};
b.bp("/rerank");
let body;
body = JSON.stringify(take(input, {
nextToken: [],
queries: (_) => _json(_),
rerankingConfiguration: (_) => se_RerankingConfiguration(_, context),
sources: (_) => se_RerankSourcesList(_, context),
}));
b.m("POST").h(headers).b(body);
return b.build();
};
export const se_RetrieveCommand = async (input, context) => {

@@ -121,2 +137,3 @@ const b = rb(input, context);

body = JSON.stringify(take(input, {
guardrailConfiguration: (_) => _json(_),
nextToken: [],

@@ -145,2 +162,18 @@ retrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context),

};
export const se_RetrieveAndGenerateStreamCommand = async (input, context) => {
const b = rb(input, context);
const headers = {
"content-type": "application/json",
};
b.bp("/retrieveAndGenerateStream");
let body;
body = JSON.stringify(take(input, {
input: (_) => _json(_),
retrieveAndGenerateConfiguration: (_) => se_RetrieveAndGenerateConfiguration(_, context),
sessionConfiguration: (_) => _json(_),
sessionId: [],
}));
b.m("POST").h(headers).b(body);
return b.build();
};
export const de_DeleteAgentMemoryCommand = async (output, context) => {

@@ -220,2 +253,17 @@ if (output.statusCode !== 202 && output.statusCode >= 300) {

};
export const de_RerankCommand = async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = map({
$metadata: deserializeMetadata(output),
});
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const doc = take(data, {
nextToken: __expectString,
results: (_) => de_RerankResultsList(_, context),
});
Object.assign(contents, doc);
return contents;
};
export const de_RetrieveCommand = async (output, context) => {

@@ -230,2 +278,3 @@ if (output.statusCode !== 200 && output.statusCode >= 300) {

const doc = take(data, {
guardrailAction: __expectString,
nextToken: __expectString,

@@ -254,2 +303,14 @@ retrievalResults: (_) => de_KnowledgeBaseRetrievalResults(_, context),

};
export const de_RetrieveAndGenerateStreamCommand = async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = map({
$metadata: deserializeMetadata(output),
[_sI]: [, output.headers[_xabkbsi]],
});
const data = output.body;
contents.stream = de_RetrieveAndGenerateStreamResponseOutput(data, context);
return contents;
};
const de_CommandError = async (output, context) => {

@@ -668,2 +729,67 @@ const parsedOutput = {

};
const de_RetrieveAndGenerateStreamResponseOutput = (output, context) => {
return context.eventStreamMarshaller.deserialize(output, async (event) => {
if (event["output"] != null) {
return {
output: await de_RetrieveAndGenerateOutputEvent_event(event["output"], context),
};
}
if (event["citation"] != null) {
return {
citation: await de_CitationEvent_event(event["citation"], context),
};
}
if (event["guardrail"] != null) {
return {
guardrail: await de_GuardrailEvent_event(event["guardrail"], context),
};
}
if (event["internalServerException"] != null) {
return {
internalServerException: await de_InternalServerException_event(event["internalServerException"], context),
};
}
if (event["validationException"] != null) {
return {
validationException: await de_ValidationException_event(event["validationException"], context),
};
}
if (event["resourceNotFoundException"] != null) {
return {
resourceNotFoundException: await de_ResourceNotFoundException_event(event["resourceNotFoundException"], context),
};
}
if (event["serviceQuotaExceededException"] != null) {
return {
serviceQuotaExceededException: await de_ServiceQuotaExceededException_event(event["serviceQuotaExceededException"], context),
};
}
if (event["throttlingException"] != null) {
return {
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context),
};
}
if (event["accessDeniedException"] != null) {
return {
accessDeniedException: await de_AccessDeniedException_event(event["accessDeniedException"], context),
};
}
if (event["conflictException"] != null) {
return {
conflictException: await de_ConflictException_event(event["conflictException"], context),
};
}
if (event["dependencyFailedException"] != null) {
return {
dependencyFailedException: await de_DependencyFailedException_event(event["dependencyFailedException"], context),
};
}
if (event["badGatewayException"] != null) {
return {
badGatewayException: await de_BadGatewayException_event(event["badGatewayException"], context),
};
}
return { $unknown: output };
});
};
const de_AccessDeniedException_event = async (output, context) => {

@@ -689,2 +815,8 @@ const parsedOutput = {

};
const de_CitationEvent_event = async (output, context) => {
const contents = {};
const data = await parseBody(output.body, context);
Object.assign(contents, de_CitationEvent(data, context));
return contents;
};
const de_ConflictException_event = async (output, context) => {

@@ -728,2 +860,8 @@ const parsedOutput = {

};
const de_GuardrailEvent_event = async (output, context) => {
const contents = {};
const data = await parseBody(output.body, context);
Object.assign(contents, _json(data));
return contents;
};
const de_InlineAgentFilePart_event = async (output, context) => {

@@ -779,2 +917,8 @@ const contents = {};

};
const de_RetrieveAndGenerateOutputEvent_event = async (output, context) => {
const contents = {};
const data = await parseBody(output.body, context);
Object.assign(contents, _json(data));
return contents;
};
const de_ReturnControlPayload_event = async (output, context) => {

@@ -825,2 +969,14 @@ const contents = {};

};
const se_BedrockRerankingConfiguration = (input, context) => {
return take(input, {
modelConfiguration: (_) => se_BedrockRerankingModelConfiguration(_, context),
numberOfResults: [],
});
};
const se_BedrockRerankingModelConfiguration = (input, context) => {
return take(input, {
additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
modelArn: [],
});
};
const se_ByteContentDoc = (input, context) => {

@@ -993,4 +1149,6 @@ return take(input, {

filter: (_) => se_RetrievalFilter(_, context),
implicitFilterConfiguration: _json,
numberOfResults: [],
overrideSearchType: [],
rerankingConfiguration: (_) => se_VectorSearchRerankingConfiguration(_, context),
});

@@ -1029,2 +1187,28 @@ };

};
const se_RerankDocument = (input, context) => {
return take(input, {
jsonDocument: (_) => se_Document(_, context),
textDocument: _json,
type: [],
});
};
const se_RerankingConfiguration = (input, context) => {
return take(input, {
bedrockRerankingConfiguration: (_) => se_BedrockRerankingConfiguration(_, context),
type: [],
});
};
const se_RerankSource = (input, context) => {
return take(input, {
inlineDocumentSource: (_) => se_RerankDocument(_, context),
type: [],
});
};
const se_RerankSourcesList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
return se_RerankSource(entry, context);
});
};
const se_RetrievalFilter = (input, context) => {

@@ -1080,2 +1264,21 @@ return RetrievalFilter.visit(input, {

};
const se_VectorSearchBedrockRerankingConfiguration = (input, context) => {
return take(input, {
metadataConfiguration: _json,
modelConfiguration: (_) => se_VectorSearchBedrockRerankingModelConfiguration(_, context),
numberOfRerankedResults: [],
});
};
const se_VectorSearchBedrockRerankingModelConfiguration = (input, context) => {
return take(input, {
additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
modelArn: [],
});
};
const se_VectorSearchRerankingConfiguration = (input, context) => {
return take(input, {
bedrockRerankingConfiguration: (_) => se_VectorSearchBedrockRerankingConfiguration(_, context),
type: [],
});
};
const se_Document = (input, context) => {

@@ -1095,2 +1298,7 @@ return input;

};
const de_CitationEvent = (output, context) => {
return take(output, {
citation: (_) => de_Citation(_, context),
});
};
const de_Citations = (output, context) => {

@@ -1381,2 +1589,24 @@ const retVal = (output || [])

};
const de_RerankDocument = (output, context) => {
return take(output, {
jsonDocument: (_) => de_Document(_, context),
textDocument: _json,
type: __expectString,
});
};
const de_RerankResult = (output, context) => {
return take(output, {
document: (_) => de_RerankDocument(_, context),
index: __expectInt32,
relevanceScore: __limitedParseFloat32,
});
};
const de_RerankResultsList = (output, context) => {
const retVal = (output || [])
.filter((e) => e != null)
.map((entry) => {
return de_RerankResult(entry, context);
});
return retVal;
};
const de_RetrievalResultMetadata = (output, context) => {

@@ -1470,1 +1700,2 @@ return Object.entries(output).reduce((acc, [key, value]) => {

const _xabasi = "x-amz-bedrock-agent-session-id";
const _xabkbsi = "x-amzn-bedrock-knowledge-base-session-id";

@@ -9,3 +9,5 @@ import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";

import { OptimizePromptCommandInput, OptimizePromptCommandOutput } from "./commands/OptimizePromptCommand";
import { RerankCommandInput, RerankCommandOutput } from "./commands/RerankCommand";
import { RetrieveAndGenerateCommandInput, RetrieveAndGenerateCommandOutput } from "./commands/RetrieveAndGenerateCommand";
import { RetrieveAndGenerateStreamCommandInput, RetrieveAndGenerateStreamCommandOutput } from "./commands/RetrieveAndGenerateStreamCommand";
import { RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";

@@ -50,2 +52,8 @@ export interface BedrockAgentRuntime {

/**
* @see {@link RerankCommand}
*/
rerank(args: RerankCommandInput, options?: __HttpHandlerOptions): Promise<RerankCommandOutput>;
rerank(args: RerankCommandInput, cb: (err: any, data?: RerankCommandOutput) => void): void;
rerank(args: RerankCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RerankCommandOutput) => void): void;
/**
* @see {@link RetrieveCommand}

@@ -62,2 +70,8 @@ */

retrieveAndGenerate(args: RetrieveAndGenerateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RetrieveAndGenerateCommandOutput) => void): void;
/**
* @see {@link RetrieveAndGenerateStreamCommand}
*/
retrieveAndGenerateStream(args: RetrieveAndGenerateStreamCommandInput, options?: __HttpHandlerOptions): Promise<RetrieveAndGenerateStreamCommandOutput>;
retrieveAndGenerateStream(args: RetrieveAndGenerateStreamCommandInput, cb: (err: any, data?: RetrieveAndGenerateStreamCommandOutput) => void): void;
retrieveAndGenerateStream(args: RetrieveAndGenerateStreamCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RetrieveAndGenerateStreamCommandOutput) => void): void;
}

@@ -64,0 +78,0 @@ /**

6

dist-types/BedrockAgentRuntimeClient.d.ts

@@ -17,3 +17,5 @@ import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";

import { OptimizePromptCommandInput, OptimizePromptCommandOutput } from "./commands/OptimizePromptCommand";
import { RerankCommandInput, RerankCommandOutput } from "./commands/RerankCommand";
import { RetrieveAndGenerateCommandInput, RetrieveAndGenerateCommandOutput } from "./commands/RetrieveAndGenerateCommand";
import { RetrieveAndGenerateStreamCommandInput, RetrieveAndGenerateStreamCommandOutput } from "./commands/RetrieveAndGenerateStreamCommand";
import { RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";

@@ -26,7 +28,7 @@ import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";

*/
export type ServiceInputTypes = DeleteAgentMemoryCommandInput | GetAgentMemoryCommandInput | InvokeAgentCommandInput | InvokeFlowCommandInput | InvokeInlineAgentCommandInput | OptimizePromptCommandInput | RetrieveAndGenerateCommandInput | RetrieveCommandInput;
export type ServiceInputTypes = DeleteAgentMemoryCommandInput | GetAgentMemoryCommandInput | InvokeAgentCommandInput | InvokeFlowCommandInput | InvokeInlineAgentCommandInput | OptimizePromptCommandInput | RerankCommandInput | RetrieveAndGenerateCommandInput | RetrieveAndGenerateStreamCommandInput | RetrieveCommandInput;
/**
* @public
*/
export type ServiceOutputTypes = DeleteAgentMemoryCommandOutput | GetAgentMemoryCommandOutput | InvokeAgentCommandOutput | InvokeFlowCommandOutput | InvokeInlineAgentCommandOutput | OptimizePromptCommandOutput | RetrieveAndGenerateCommandOutput | RetrieveCommandOutput;
export type ServiceOutputTypes = DeleteAgentMemoryCommandOutput | GetAgentMemoryCommandOutput | InvokeAgentCommandOutput | InvokeFlowCommandOutput | InvokeInlineAgentCommandOutput | OptimizePromptCommandOutput | RerankCommandOutput | RetrieveAndGenerateCommandOutput | RetrieveAndGenerateStreamCommandOutput | RetrieveCommandOutput;
/**

@@ -33,0 +35,0 @@ * @public

@@ -7,3 +7,5 @@ export * from "./DeleteAgentMemoryCommand";

export * from "./OptimizePromptCommand";
export * from "./RerankCommand";
export * from "./RetrieveAndGenerateCommand";
export * from "./RetrieveAndGenerateStreamCommand";
export * from "./RetrieveCommand";

@@ -181,2 +181,39 @@ import { Command as $Command } from "@smithy/smithy-client";

* },
* rerankingConfiguration: { // VectorSearchRerankingConfiguration
* type: "BEDROCK_RERANKING_MODEL", // required
* bedrockRerankingConfiguration: { // VectorSearchBedrockRerankingConfiguration
* modelConfiguration: { // VectorSearchBedrockRerankingModelConfiguration
* modelArn: "STRING_VALUE", // required
* additionalModelRequestFields: { // AdditionalModelRequestFields
* "<keys>": "DOCUMENT_VALUE",
* },
* },
* numberOfRerankedResults: Number("int"),
* metadataConfiguration: { // MetadataConfigurationForReranking
* selectionMode: "SELECTIVE" || "ALL", // required
* selectiveModeConfiguration: { // RerankingMetadataSelectiveModeConfiguration Union: only one key present
* fieldsToInclude: [ // FieldsForReranking
* { // FieldForReranking
* fieldName: "STRING_VALUE", // required
* },
* ],
* fieldsToExclude: [
* {
* fieldName: "STRING_VALUE", // required
* },
* ],
* },
* },
* },
* },
* implicitFilterConfiguration: { // ImplicitFilterConfiguration
* metadataAttributes: [ // MetadataAttributeSchemaList // required
* { // MetadataAttributeSchema
* key: "STRING_VALUE", // required
* type: "STRING" || "NUMBER" || "BOOLEAN" || "STRING_LIST", // required
* description: "STRING_VALUE", // required
* },
* ],
* modelArn: "STRING_VALUE", // required
* },
* },

@@ -223,3 +260,3 @@ * },

* // location: { // RetrievalResultLocation
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
* // s3Location: { // RetrievalResultS3Location

@@ -240,2 +277,5 @@ * // uri: "STRING_VALUE",

* // },
* // customDocumentLocation: { // RetrievalResultCustomDocumentLocation
* // id: "STRING_VALUE",
* // },
* // },

@@ -459,3 +499,3 @@ * // metadata: { // RetrievalResultMetadata

* // location: {
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
* // s3Location: {

@@ -476,2 +516,5 @@ * // uri: "STRING_VALUE",

* // },
* // customDocumentLocation: {
* // id: "STRING_VALUE",
* // },
* // },

@@ -478,0 +521,0 @@ * // metadata: {

@@ -218,2 +218,39 @@ import { Command as $Command } from "@smithy/smithy-client";

* },
* rerankingConfiguration: { // VectorSearchRerankingConfiguration
* type: "BEDROCK_RERANKING_MODEL", // required
* bedrockRerankingConfiguration: { // VectorSearchBedrockRerankingConfiguration
* modelConfiguration: { // VectorSearchBedrockRerankingModelConfiguration
* modelArn: "STRING_VALUE", // required
* additionalModelRequestFields: { // AdditionalModelRequestFields
* "<keys>": "DOCUMENT_VALUE",
* },
* },
* numberOfRerankedResults: Number("int"),
* metadataConfiguration: { // MetadataConfigurationForReranking
* selectionMode: "SELECTIVE" || "ALL", // required
* selectiveModeConfiguration: { // RerankingMetadataSelectiveModeConfiguration Union: only one key present
* fieldsToInclude: [ // FieldsForReranking
* { // FieldForReranking
* fieldName: "STRING_VALUE", // required
* },
* ],
* fieldsToExclude: [
* {
* fieldName: "STRING_VALUE", // required
* },
* ],
* },
* },
* },
* },
* implicitFilterConfiguration: { // ImplicitFilterConfiguration
* metadataAttributes: [ // MetadataAttributeSchemaList // required
* { // MetadataAttributeSchema
* key: "STRING_VALUE", // required
* type: "STRING" || "NUMBER" || "BOOLEAN" || "STRING_LIST", // required
* description: "STRING_VALUE", // required
* },
* ],
* modelArn: "STRING_VALUE", // required
* },
* },

@@ -273,3 +310,3 @@ * },

* // location: { // RetrievalResultLocation
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
* // s3Location: { // RetrievalResultS3Location

@@ -290,2 +327,5 @@ * // uri: "STRING_VALUE",

* // },
* // customDocumentLocation: { // RetrievalResultCustomDocumentLocation
* // id: "STRING_VALUE",
* // },
* // },

@@ -509,3 +549,3 @@ * // metadata: { // RetrievalResultMetadata

* // location: {
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
* // s3Location: {

@@ -526,2 +566,5 @@ * // uri: "STRING_VALUE",

* // },
* // customDocumentLocation: {
* // id: "STRING_VALUE",
* // },
* // },

@@ -528,0 +571,0 @@ * // metadata: {

@@ -103,2 +103,39 @@ import { Command as $Command } from "@smithy/smithy-client";

* },
* rerankingConfiguration: { // VectorSearchRerankingConfiguration
* type: "BEDROCK_RERANKING_MODEL", // required
* bedrockRerankingConfiguration: { // VectorSearchBedrockRerankingConfiguration
* modelConfiguration: { // VectorSearchBedrockRerankingModelConfiguration
* modelArn: "STRING_VALUE", // required
* additionalModelRequestFields: { // AdditionalModelRequestFields
* "<keys>": "DOCUMENT_VALUE",
* },
* },
* numberOfRerankedResults: Number("int"),
* metadataConfiguration: { // MetadataConfigurationForReranking
* selectionMode: "SELECTIVE" || "ALL", // required
* selectiveModeConfiguration: { // RerankingMetadataSelectiveModeConfiguration Union: only one key present
* fieldsToInclude: [ // FieldsForReranking
* { // FieldForReranking
* fieldName: "STRING_VALUE", // required
* },
* ],
* fieldsToExclude: [
* {
* fieldName: "STRING_VALUE", // required
* },
* ],
* },
* },
* },
* },
* implicitFilterConfiguration: { // ImplicitFilterConfiguration
* metadataAttributes: [ // MetadataAttributeSchemaList // required
* { // MetadataAttributeSchema
* key: "STRING_VALUE", // required
* type: "STRING" || "NUMBER" || "BOOLEAN" || "STRING_LIST", // required
* description: "STRING_VALUE", // required
* },
* ],
* modelArn: "STRING_VALUE", // required
* },
* },

@@ -124,3 +161,3 @@ * },

* },
* additionalModelRequestFields: { // AdditionalModelRequestFields
* additionalModelRequestFields: {
* "<keys>": "DOCUMENT_VALUE",

@@ -218,3 +255,3 @@ * },

* // location: { // RetrievalResultLocation
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
* // s3Location: { // RetrievalResultS3Location

@@ -235,2 +272,5 @@ * // uri: "STRING_VALUE",

* // },
* // customDocumentLocation: { // RetrievalResultCustomDocumentLocation
* // id: "STRING_VALUE",
* // },
* // },

@@ -237,0 +277,0 @@ * // metadata: { // RetrievalResultMetadata

@@ -98,4 +98,45 @@ import { Command as $Command } from "@smithy/smithy-client";

* },
* rerankingConfiguration: { // VectorSearchRerankingConfiguration
* type: "BEDROCK_RERANKING_MODEL", // required
* bedrockRerankingConfiguration: { // VectorSearchBedrockRerankingConfiguration
* modelConfiguration: { // VectorSearchBedrockRerankingModelConfiguration
* modelArn: "STRING_VALUE", // required
* additionalModelRequestFields: { // AdditionalModelRequestFields
* "<keys>": "DOCUMENT_VALUE",
* },
* },
* numberOfRerankedResults: Number("int"),
* metadataConfiguration: { // MetadataConfigurationForReranking
* selectionMode: "SELECTIVE" || "ALL", // required
* selectiveModeConfiguration: { // RerankingMetadataSelectiveModeConfiguration Union: only one key present
* fieldsToInclude: [ // FieldsForReranking
* { // FieldForReranking
* fieldName: "STRING_VALUE", // required
* },
* ],
* fieldsToExclude: [
* {
* fieldName: "STRING_VALUE", // required
* },
* ],
* },
* },
* },
* },
* implicitFilterConfiguration: { // ImplicitFilterConfiguration
* metadataAttributes: [ // MetadataAttributeSchemaList // required
* { // MetadataAttributeSchema
* key: "STRING_VALUE", // required
* type: "STRING" || "NUMBER" || "BOOLEAN" || "STRING_LIST", // required
* description: "STRING_VALUE", // required
* },
* ],
* modelArn: "STRING_VALUE", // required
* },
* },
* },
* guardrailConfiguration: { // GuardrailConfiguration
* guardrailId: "STRING_VALUE", // required
* guardrailVersion: "STRING_VALUE", // required
* },
* nextToken: "STRING_VALUE",

@@ -112,3 +153,3 @@ * };

* // location: { // RetrievalResultLocation
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT", // required
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required
* // s3Location: { // RetrievalResultS3Location

@@ -129,2 +170,5 @@ * // uri: "STRING_VALUE",

* // },
* // customDocumentLocation: { // RetrievalResultCustomDocumentLocation
* // id: "STRING_VALUE",
* // },
* // },

@@ -137,2 +181,3 @@ * // score: Number("double"),

* // ],
* // guardrailAction: "INTERVENED" || "NONE",
* // nextToken: "STRING_VALUE",

@@ -139,0 +184,0 @@ * // };

export * from "./GetAgentMemoryPaginator";
export * from "./Interfaces";
export * from "./RerankPaginator";
export * from "./RetrievePaginator";

@@ -9,3 +9,5 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";

import { OptimizePromptCommandInput, OptimizePromptCommandOutput } from "../commands/OptimizePromptCommand";
import { RerankCommandInput, RerankCommandOutput } from "../commands/RerankCommand";
import { RetrieveAndGenerateCommandInput, RetrieveAndGenerateCommandOutput } from "../commands/RetrieveAndGenerateCommand";
import { RetrieveAndGenerateStreamCommandInput, RetrieveAndGenerateStreamCommandOutput } from "../commands/RetrieveAndGenerateStreamCommand";
import { RetrieveCommandInput, RetrieveCommandOutput } from "../commands/RetrieveCommand";

@@ -37,2 +39,6 @@ /**

/**
* serializeAws_restJson1RerankCommand
*/
export declare const se_RerankCommand: (input: RerankCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
/**
* serializeAws_restJson1RetrieveCommand

@@ -46,2 +52,6 @@ */

/**
* serializeAws_restJson1RetrieveAndGenerateStreamCommand
*/
export declare const se_RetrieveAndGenerateStreamCommand: (input: RetrieveAndGenerateStreamCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
/**
* deserializeAws_restJson1DeleteAgentMemoryCommand

@@ -71,2 +81,6 @@ */

/**
* deserializeAws_restJson1RerankCommand
*/
export declare const de_RerankCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RerankCommandOutput>;
/**
* deserializeAws_restJson1RetrieveCommand

@@ -79,1 +93,5 @@ */

export declare const de_RetrieveAndGenerateCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RetrieveAndGenerateCommandOutput>;
/**
* deserializeAws_restJson1RetrieveAndGenerateStreamCommand
*/
export declare const de_RetrieveAndGenerateStreamCommand: (output: __HttpResponse, context: __SerdeContext & __EventStreamSerdeContext) => Promise<RetrieveAndGenerateStreamCommandOutput>;

@@ -28,2 +28,6 @@ import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";

import {
RerankCommandInput,
RerankCommandOutput,
} from "./commands/RerankCommand";
import {
RetrieveAndGenerateCommandInput,

@@ -33,2 +37,6 @@ RetrieveAndGenerateCommandOutput,

import {
RetrieveAndGenerateStreamCommandInput,
RetrieveAndGenerateStreamCommandOutput,
} from "./commands/RetrieveAndGenerateStreamCommand";
import {
RetrieveCommandInput,

@@ -116,2 +124,15 @@ RetrieveCommandOutput,

): void;
rerank(
args: RerankCommandInput,
options?: __HttpHandlerOptions
): Promise<RerankCommandOutput>;
rerank(
args: RerankCommandInput,
cb: (err: any, data?: RerankCommandOutput) => void
): void;
rerank(
args: RerankCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: RerankCommandOutput) => void
): void;
retrieve(

@@ -143,2 +164,15 @@ args: RetrieveCommandInput,

): void;
retrieveAndGenerateStream(
args: RetrieveAndGenerateStreamCommandInput,
options?: __HttpHandlerOptions
): Promise<RetrieveAndGenerateStreamCommandOutput>;
retrieveAndGenerateStream(
args: RetrieveAndGenerateStreamCommandInput,
cb: (err: any, data?: RetrieveAndGenerateStreamCommandOutput) => void
): void;
retrieveAndGenerateStream(
args: RetrieveAndGenerateStreamCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: RetrieveAndGenerateStreamCommandOutput) => void
): void;
}

@@ -145,0 +179,0 @@ export declare class BedrockAgentRuntime

@@ -78,2 +78,6 @@ import {

import {
RerankCommandInput,
RerankCommandOutput,
} from "./commands/RerankCommand";
import {
RetrieveAndGenerateCommandInput,

@@ -83,2 +87,6 @@ RetrieveAndGenerateCommandOutput,

import {
RetrieveAndGenerateStreamCommandInput,
RetrieveAndGenerateStreamCommandOutput,
} from "./commands/RetrieveAndGenerateStreamCommand";
import {
RetrieveCommandInput,

@@ -101,3 +109,5 @@ RetrieveCommandOutput,

| OptimizePromptCommandInput
| RerankCommandInput
| RetrieveAndGenerateCommandInput
| RetrieveAndGenerateStreamCommandInput
| RetrieveCommandInput;

@@ -111,3 +121,5 @@ export type ServiceOutputTypes =

| OptimizePromptCommandOutput
| RerankCommandOutput
| RetrieveAndGenerateCommandOutput
| RetrieveAndGenerateStreamCommandOutput
| RetrieveCommandOutput;

@@ -114,0 +126,0 @@ export interface ClientDefaults

@@ -7,3 +7,5 @@ export * from "./DeleteAgentMemoryCommand";

export * from "./OptimizePromptCommand";
export * from "./RerankCommand";
export * from "./RetrieveAndGenerateCommand";
export * from "./RetrieveAndGenerateStreamCommand";
export * from "./RetrieveCommand";
export * from "./GetAgentMemoryPaginator";
export * from "./Interfaces";
export * from "./RerankPaginator";
export * from "./RetrievePaginator";

@@ -34,2 +34,6 @@ import {

import {
RerankCommandInput,
RerankCommandOutput,
} from "../commands/RerankCommand";
import {
RetrieveAndGenerateCommandInput,

@@ -39,2 +43,6 @@ RetrieveAndGenerateCommandOutput,

import {
RetrieveAndGenerateStreamCommandInput,
RetrieveAndGenerateStreamCommandOutput,
} from "../commands/RetrieveAndGenerateStreamCommand";
import {
RetrieveCommandInput,

@@ -67,2 +75,6 @@ RetrieveCommandOutput,

) => Promise<__HttpRequest>;
export declare const se_RerankCommand: (
input: RerankCommandInput,
context: __SerdeContext
) => Promise<__HttpRequest>;
export declare const se_RetrieveCommand: (

@@ -76,2 +88,6 @@ input: RetrieveCommandInput,

) => Promise<__HttpRequest>;
export declare const se_RetrieveAndGenerateStreamCommand: (
input: RetrieveAndGenerateStreamCommandInput,
context: __SerdeContext
) => Promise<__HttpRequest>;
export declare const de_DeleteAgentMemoryCommand: (

@@ -101,2 +117,6 @@ output: __HttpResponse,

) => Promise<OptimizePromptCommandOutput>;
export declare const de_RerankCommand: (
output: __HttpResponse,
context: __SerdeContext
) => Promise<RerankCommandOutput>;
export declare const de_RetrieveCommand: (

@@ -110,1 +130,5 @@ output: __HttpResponse,

) => Promise<RetrieveAndGenerateCommandOutput>;
export declare const de_RetrieveAndGenerateStreamCommand: (
output: __HttpResponse,
context: __SerdeContext & __EventStreamSerdeContext
) => Promise<RetrieveAndGenerateStreamCommandOutput>;
{
"name": "@aws-sdk/client-bedrock-agent-runtime",
"description": "AWS SDK for JavaScript Bedrock Agent Runtime Client for Node.js, Browser and React Native",
"version": "3.701.0",
"version": "3.703.0",
"scripts": {

@@ -6,0 +6,0 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",

@@ -256,2 +256,10 @@ <!-- generated file, do not edit directly -->

<summary>
Rerank
</summary>
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/RerankCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/RerankCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/RerankCommandOutput/)
</details>
<details>
<summary>
Retrieve

@@ -271,1 +279,9 @@ </summary>

</details>
<details>
<summary>
RetrieveAndGenerateStream
</summary>
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/RetrieveAndGenerateStreamCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/RetrieveAndGenerateStreamCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/RetrieveAndGenerateStreamCommandOutput/)
</details>

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc