Skip to content

Commit

Permalink
Merge branch 'main' into bump-0.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenbaker committed Aug 7, 2024
2 parents 07260d5 + e85019f commit f3c002a
Show file tree
Hide file tree
Showing 58 changed files with 1,016 additions and 216 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.625.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.624.0...v3.625.0) (2024-08-06)


### Features

* **client-bedrock-agent-runtime:** Introduce model invocation output traces for orchestration traces, which contain the model's raw response and usage. ([ad61bac](https://github.com/aws/aws-sdk-js-v3/commit/ad61bacdf1a8f9f21eaa67aef7d9b5c2e12f2cff))
* **client-cognito-identity-provider:** Advanced security feature updates to include password history and log export for Cognito user pools. ([f35898e](https://github.com/aws/aws-sdk-js-v3/commit/f35898ec563ffb61bb40d88f6012d9571bbd8d75))
* **client-cost-optimization-hub:** This release adds savings percentage support to the ListRecommendationSummaries API. ([82ea670](https://github.com/aws/aws-sdk-js-v3/commit/82ea670c8df1aa3fc00ca872c1105c9fbf59a678))
* **client-workspaces:** Added support for BYOL_GRAPHICS_G4DN_WSP IngestionProcess ([871d342](https://github.com/aws/aws-sdk-js-v3/commit/871d34202fb92f2afb59efa2fc199cec50239778))





# [3.624.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.623.0...v3.624.0) (2024-08-05)


Expand Down
11 changes: 11 additions & 0 deletions clients/client-bedrock-agent-runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.625.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.624.0...v3.625.0) (2024-08-06)


### Features

* **client-bedrock-agent-runtime:** Introduce model invocation output traces for orchestration traces, which contain the model's raw response and usage. ([ad61bac](https://github.com/aws/aws-sdk-js-v3/commit/ad61bacdf1a8f9f21eaa67aef7d9b5c2e12f2cff))





# [3.624.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.623.0...v3.624.0) (2024-08-05)

**Note:** Version bump only for package @aws-sdk/client-bedrock-agent-runtime
Expand Down
2 changes: 1 addition & 1 deletion clients/client-bedrock-agent-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"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.624.0",
"version": "3.625.0",
"scripts": {
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-agent-runtime",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,18 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
* // parserMode: "DEFAULT" || "OVERRIDDEN",
* // },
* // modelInvocationOutput: { // OrchestrationModelInvocationOutput
* // traceId: "STRING_VALUE",
* // rawResponse: { // RawResponse
* // content: "STRING_VALUE",
* // },
* // metadata: { // Metadata
* // usage: { // Usage
* // inputTokens: Number("int"),
* // outputTokens: Number("int"),
* // },
* // },
* // },
* // },
* // postProcessingTrace: { // PostProcessingTrace Union: only one key present
* // modelInvocationInput: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ export interface InvokeFlowCommandOutput extends InvokeFlowResponse, __MetadataB

/**
* <p>Invokes an alias of a flow to run the inputs that you specify and return the output of each node as a stream. If there's an error, the error is returned. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/flows-test.html">Test a flow in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
* <note>
* <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>InvokeFlow</code>.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
143 changes: 131 additions & 12 deletions clients/client-bedrock-agent-runtime/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export type FlowInputContent = FlowInputContent.DocumentMember | FlowInputConten
*/
export namespace FlowInputContent {
/**
* <p>The input for the flow input node.</p>
* <p>The input to send to the prompt flow input node.</p>
* @public
*/
export interface DocumentMember {
Expand Down Expand Up @@ -282,7 +282,7 @@ export namespace FlowInputContent {
}

/**
* <p>Contains information about an input into the flow and what to do with it.</p>
* <p>Contains information about an input into the prompt flow and where to send it.</p>
* <p>This data type is used in the following API operations:</p>
* <ul>
* <li>
Expand All @@ -295,19 +295,19 @@ export namespace FlowInputContent {
*/
export interface FlowInput {
/**
* <p>A name for the input of the flow input node.</p>
* <p>The name of the flow input node that begins the prompt flow.</p>
* @public
*/
nodeName: string | undefined;

/**
* <p>A name for the output of the flow input node.</p>
* <p>The name of the output from the flow input node that begins the prompt flow.</p>
* @public
*/
nodeOutputName: string | undefined;

/**
* <p>Contains information about an input into the flow.</p>
* <p>Contains information about an input into the prompt flow.</p>
* @public
*/
content: FlowInputContent | undefined;
Expand Down Expand Up @@ -370,7 +370,7 @@ export interface FlowCompletionEvent {
}

/**
* <p>Contains information about the output node.</p>
* <p>Contains information about the content in an output from prompt flow invocation.</p>
* <p>This data type is used in the following API operations:</p>
* <ul>
* <li>
Expand All @@ -388,7 +388,7 @@ export type FlowOutputContent = FlowOutputContent.DocumentMember | FlowOutputCon
*/
export namespace FlowOutputContent {
/**
* <p>A name for the output of the flow.</p>
* <p>The content in the output.</p>
* @public
*/
export interface DocumentMember {
Expand Down Expand Up @@ -435,7 +435,7 @@ export const NodeType = {
export type NodeType = (typeof NodeType)[keyof typeof NodeType];

/**
* <p>Contains information about an output from flow invoction.</p>
* <p>Contains information about an output from prompt flow invoction.</p>
* <p>This data type is used in the following API operations:</p>
* <ul>
* <li>
Expand All @@ -448,19 +448,19 @@ export type NodeType = (typeof NodeType)[keyof typeof NodeType];
*/
export interface FlowOutputEvent {
/**
* <p>The name of the node to which input was provided.</p>
* <p>The name of the flow output node that the output is from.</p>
* @public
*/
nodeName: string | undefined;

/**
* <p>The type of node to which input was provided.</p>
* <p>The type of the node that the output is from.</p>
* @public
*/
nodeType: NodeType | undefined;

/**
* <p>The output of the node.</p>
* <p>The content in the output.</p>
* @public
*/
content: FlowOutputContent | undefined;
Expand Down Expand Up @@ -2378,7 +2378,7 @@ export interface InferenceConfiguration {
temperature?: number;

/**
* <p>While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for <code>Top P</code> determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set <code>topP</code> to 80, the model only selects the next token from the top 80% of the probability distribution of next tokens.</p>
* <p>While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for <code>Top P</code> determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set <code>topP</code> to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens.</p>
* @public
*/
topP?: number;
Expand Down Expand Up @@ -2491,6 +2491,72 @@ export interface ModelInvocationInput {
parserMode?: CreationMode;
}

/**
* <p>Contains information of the usage of the foundation model.</p>
* @public
*/
export interface Usage {
/**
* <p>Contains information about the input tokens from the foundation model usage.</p>
* @public
*/
inputTokens?: number;

/**
* <p>Contains information about the output tokens from the foundation model usage.</p>
* @public
*/
outputTokens?: number;
}

/**
* <p>Provides details of the foundation model.</p>
* @public
*/
export interface Metadata {
/**
* <p>Contains details of the foundation model usage.</p>
* @public
*/
usage?: Usage;
}

/**
* <p>Contains the raw output from the foundation model.</p>
* @public
*/
export interface RawResponse {
/**
* <p>The foundation model's raw output content.</p>
* @public
*/
content?: string;
}

/**
* <p>The foundation model output from the orchestration step.</p>
* @public
*/
export interface OrchestrationModelInvocationOutput {
/**
* <p>The unique identifier of the trace.</p>
* @public
*/
traceId?: string;

/**
* <p>Contains details of the raw response from the foundation model output.</p>
* @public
*/
rawResponse?: RawResponse;

/**
* <p>Contains information about the foundation model output.</p>
* @public
*/
metadata?: Metadata;
}

/**
* <p>Contains the JSON-formatted string returned by the API invoked by the code interpreter.</p>
* @public
Expand Down Expand Up @@ -2690,6 +2756,7 @@ export interface Rationale {
export type OrchestrationTrace =
| OrchestrationTrace.InvocationInputMember
| OrchestrationTrace.ModelInvocationInputMember
| OrchestrationTrace.ModelInvocationOutputMember
| OrchestrationTrace.ObservationMember
| OrchestrationTrace.RationaleMember
| OrchestrationTrace.$UnknownMember;
Expand All @@ -2707,6 +2774,7 @@ export namespace OrchestrationTrace {
invocationInput?: never;
observation?: never;
modelInvocationInput?: never;
modelInvocationOutput?: never;
$unknown?: never;
}

Expand All @@ -2719,6 +2787,7 @@ export namespace OrchestrationTrace {
invocationInput: InvocationInput;
observation?: never;
modelInvocationInput?: never;
modelInvocationOutput?: never;
$unknown?: never;
}

Expand All @@ -2731,6 +2800,7 @@ export namespace OrchestrationTrace {
invocationInput?: never;
observation: Observation;
modelInvocationInput?: never;
modelInvocationOutput?: never;
$unknown?: never;
}

Expand All @@ -2754,6 +2824,20 @@ export namespace OrchestrationTrace {
invocationInput?: never;
observation?: never;
modelInvocationInput: ModelInvocationInput;
modelInvocationOutput?: never;
$unknown?: never;
}

/**
* <p>Contains information pertaining to the output from the foundation model that is being invoked.</p>
* @public
*/
export interface ModelInvocationOutputMember {
rationale?: never;
invocationInput?: never;
observation?: never;
modelInvocationInput?: never;
modelInvocationOutput: OrchestrationModelInvocationOutput;
$unknown?: never;
}

Expand All @@ -2765,6 +2849,7 @@ export namespace OrchestrationTrace {
invocationInput?: never;
observation?: never;
modelInvocationInput?: never;
modelInvocationOutput?: never;
$unknown: [string, any];
}

Expand All @@ -2773,6 +2858,7 @@ export namespace OrchestrationTrace {
invocationInput: (value: InvocationInput) => T;
observation: (value: Observation) => T;
modelInvocationInput: (value: ModelInvocationInput) => T;
modelInvocationOutput: (value: OrchestrationModelInvocationOutput) => T;
_: (name: string, value: any) => T;
}

Expand All @@ -2781,6 +2867,7 @@ export namespace OrchestrationTrace {
if (value.invocationInput !== undefined) return visitor.invocationInput(value.invocationInput);
if (value.observation !== undefined) return visitor.observation(value.observation);
if (value.modelInvocationInput !== undefined) return visitor.modelInvocationInput(value.modelInvocationInput);
if (value.modelInvocationOutput !== undefined) return visitor.modelInvocationOutput(value.modelInvocationOutput);
return visitor._(value.$unknown[0], value.$unknown[1]);
};
}
Expand Down Expand Up @@ -5298,6 +5385,37 @@ export const ModelInvocationInputFilterSensitiveLog = (obj: ModelInvocationInput
...(obj.text && { text: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const UsageFilterSensitiveLog = (obj: Usage): any => ({
...obj,
});

/**
* @internal
*/
export const MetadataFilterSensitiveLog = (obj: Metadata): any => ({
...obj,
...(obj.usage && { usage: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const RawResponseFilterSensitiveLog = (obj: RawResponse): any => ({
...obj,
});

/**
* @internal
*/
export const OrchestrationModelInvocationOutputFilterSensitiveLog = (obj: OrchestrationModelInvocationOutput): any => ({
...obj,
...(obj.rawResponse && { rawResponse: SENSITIVE_STRING }),
...(obj.metadata && { metadata: SENSITIVE_STRING }),
});

/**
* @internal
*/
Expand Down Expand Up @@ -5355,6 +5473,7 @@ export const OrchestrationTraceFilterSensitiveLog = (obj: OrchestrationTrace): a
if (obj.invocationInput !== undefined) return { invocationInput: SENSITIVE_STRING };
if (obj.observation !== undefined) return { observation: SENSITIVE_STRING };
if (obj.modelInvocationInput !== undefined) return { modelInvocationInput: SENSITIVE_STRING };
if (obj.modelInvocationOutput !== undefined) return { modelInvocationOutput: SENSITIVE_STRING };
if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" };
};

Expand Down
Loading

0 comments on commit f3c002a

Please sign in to comment.