@effect/ai-amazon-bedrock 0.16.1 → 4.1.4
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/AGENTS.md +434 -0
- package/CLAUDE.md +434 -0
- package/README.md +76 -3
- package/ai-docs/README.md +44 -0
- package/ai-docs/package.json +36 -0
- package/ai-docs/src/01_effect/01_basics/01_effect-gen.ts +30 -0
- package/ai-docs/src/01_effect/01_basics/02_effect-fn.ts +52 -0
- package/ai-docs/src/01_effect/01_basics/10_creating-effects.ts +74 -0
- package/ai-docs/src/01_effect/01_basics/index.md +7 -0
- package/ai-docs/src/01_effect/02_schema/10_schema-basics.ts +43 -0
- package/ai-docs/src/01_effect/02_schema/index.md +7 -0
- package/ai-docs/src/01_effect/03_services/01_service.ts +45 -0
- package/ai-docs/src/01_effect/03_services/10_reference.ts +10 -0
- package/ai-docs/src/01_effect/03_services/20_layer-composition.ts +70 -0
- package/ai-docs/src/01_effect/03_services/20_layer-unwrap.ts +66 -0
- package/ai-docs/src/01_effect/03_services/index.md +5 -0
- package/ai-docs/src/01_effect/04_errors/01_error-handling.ts +30 -0
- package/ai-docs/src/01_effect/04_errors/10_catch-tags.ts +24 -0
- package/ai-docs/src/01_effect/04_errors/20_reason-errors.ts +64 -0
- package/ai-docs/src/01_effect/04_errors/index.md +1 -0
- package/ai-docs/src/01_effect/05_resources/10_acquire-release.ts +105 -0
- package/ai-docs/src/01_effect/05_resources/20_layer-side-effects.ts +31 -0
- package/ai-docs/src/01_effect/05_resources/30_layer-map.ts +86 -0
- package/ai-docs/src/01_effect/05_resources/index.md +3 -0
- package/ai-docs/src/01_effect/06_running/10_run-main.ts +30 -0
- package/ai-docs/src/01_effect/06_running/20_layer-launch.ts +27 -0
- package/ai-docs/src/01_effect/06_running/index.md +1 -0
- package/ai-docs/src/01_effect/07_pubsub/10_pubsub.ts +56 -0
- package/ai-docs/src/01_effect/07_pubsub/index.md +3 -0
- package/ai-docs/src/03_stream/10_creating-streams.ts +103 -0
- package/ai-docs/src/03_stream/20_consuming-streams.ts +137 -0
- package/ai-docs/src/03_stream/30_encoding.ts +163 -0
- package/ai-docs/src/03_stream/index.md +4 -0
- package/ai-docs/src/04_integration/10_managed-runtime.ts +129 -0
- package/ai-docs/src/04_integration/index.md +5 -0
- package/ai-docs/src/05_batching/10_request-resolver.ts +89 -0
- package/ai-docs/src/05_batching/index.md +3 -0
- package/ai-docs/src/06_schedule/10_schedules.ts +111 -0
- package/ai-docs/src/06_schedule/index.md +3 -0
- package/ai-docs/src/07_datetime/10_creating-and-formatting.ts +30 -0
- package/ai-docs/src/07_datetime/20_time-zones.ts +44 -0
- package/ai-docs/src/07_datetime/index.md +5 -0
- package/ai-docs/src/08_observability/10_logging.ts +66 -0
- package/ai-docs/src/08_observability/20_otlp-tracing.ts +95 -0
- package/ai-docs/src/08_observability/index.md +7 -0
- package/ai-docs/src/09_testing/10_effect-tests.ts +55 -0
- package/ai-docs/src/09_testing/20_layer-tests.ts +138 -0
- package/ai-docs/src/09_testing/index.md +1 -0
- package/ai-docs/src/10_predicate/01_basics.ts +14 -0
- package/ai-docs/src/10_predicate/index.md +9 -0
- package/ai-docs/src/40_sql/10_basics.ts +175 -0
- package/ai-docs/src/40_sql/index.md +6 -0
- package/ai-docs/src/50_http-client/10_basics.ts +102 -0
- package/ai-docs/src/50_http-client/index.md +3 -0
- package/ai-docs/src/51_http-server/10_basics.ts +118 -0
- package/ai-docs/src/51_http-server/20_testing.ts +100 -0
- package/ai-docs/src/51_http-server/fixtures/api/Api.ts +14 -0
- package/ai-docs/src/51_http-server/fixtures/api/Authorization.ts +36 -0
- package/ai-docs/src/51_http-server/fixtures/api/System.ts +10 -0
- package/ai-docs/src/51_http-server/fixtures/api/Users.ts +107 -0
- package/ai-docs/src/51_http-server/fixtures/domain/User.ts +21 -0
- package/ai-docs/src/51_http-server/fixtures/domain/UserErrors.ts +22 -0
- package/ai-docs/src/51_http-server/fixtures/server/Authorization.ts +37 -0
- package/ai-docs/src/51_http-server/fixtures/server/Users/http.ts +80 -0
- package/ai-docs/src/51_http-server/fixtures/server/Users.ts +183 -0
- package/ai-docs/src/51_http-server/index.md +3 -0
- package/ai-docs/src/52_graphql/10_basics.ts +117 -0
- package/ai-docs/src/52_graphql/20_testing.ts +45 -0
- package/ai-docs/src/52_graphql/30_batching.ts +118 -0
- package/ai-docs/src/52_graphql/40_aliased-batching.ts +124 -0
- package/ai-docs/src/52_graphql/50_errors-and-retries.ts +74 -0
- package/ai-docs/src/52_graphql/index.md +6 -0
- package/ai-docs/src/60_child-process/10_working-with-child-processes.ts +117 -0
- package/ai-docs/src/60_child-process/index.md +3 -0
- package/ai-docs/src/70_cli/10_basics.ts +162 -0
- package/ai-docs/src/70_cli/index.md +5 -0
- package/ai-docs/src/71_ai/10_language-model.ts +156 -0
- package/ai-docs/src/71_ai/20_tools.ts +226 -0
- package/ai-docs/src/71_ai/30_chat.ts +158 -0
- package/ai-docs/src/71_ai/fixtures/domain/LaunchPlan.ts +9 -0
- package/ai-docs/src/71_ai/index.md +5 -0
- package/ai-docs/src/80_cluster/10_entities.ts +97 -0
- package/ai-docs/src/80_cluster/index.md +4 -0
- package/ai-docs/src/index.md +10 -0
- package/ai-docs/tsconfig.json +28 -0
- package/dist/AmazonBedrockClient.d.ts +227 -0
- package/dist/AmazonBedrockClient.d.ts.map +1 -0
- package/dist/AmazonBedrockClient.js +281 -0
- package/dist/AmazonBedrockClient.js.map +1 -0
- package/dist/AmazonBedrockConfig.d.ts +76 -0
- package/dist/AmazonBedrockConfig.d.ts.map +1 -0
- package/dist/AmazonBedrockConfig.js +41 -0
- package/dist/AmazonBedrockConfig.js.map +1 -0
- package/dist/AmazonBedrockLanguageModel.d.ts +315 -0
- package/dist/AmazonBedrockLanguageModel.d.ts.map +1 -0
- package/dist/AmazonBedrockLanguageModel.js +991 -0
- package/dist/AmazonBedrockLanguageModel.js.map +1 -0
- package/dist/AmazonBedrockSchema.d.ts +918 -0
- package/dist/AmazonBedrockSchema.d.ts.map +1 -0
- package/dist/AmazonBedrockSchema.js +536 -0
- package/dist/AmazonBedrockSchema.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/{esm/index.js → index.js} +13 -12
- package/dist/index.js.map +1 -0
- package/dist/internal/errors.d.ts +2 -0
- package/dist/internal/errors.d.ts.map +1 -0
- package/dist/internal/errors.js +185 -0
- package/dist/internal/errors.js.map +1 -0
- package/dist/internal/eventStream.d.ts +2 -0
- package/dist/internal/eventStream.d.ts.map +1 -0
- package/dist/internal/eventStream.js +180 -0
- package/dist/internal/eventStream.js.map +1 -0
- package/dist/internal/sigv4.d.ts +2 -0
- package/dist/internal/sigv4.d.ts.map +1 -0
- package/dist/internal/sigv4.js +115 -0
- package/dist/internal/sigv4.js.map +1 -0
- package/dist/{dts/internal → internal}/utilities.d.ts.map +1 -1
- package/dist/internal/utilities.js +17 -0
- package/dist/internal/utilities.js.map +1 -0
- package/package.json +45 -84
- package/src/AmazonBedrockClient.ts +447 -263
- package/src/AmazonBedrockConfig.ts +55 -40
- package/src/AmazonBedrockLanguageModel.ts +950 -929
- package/src/AmazonBedrockSchema.ts +526 -970
- package/src/index.ts +15 -14
- package/src/internal/errors.ts +207 -0
- package/src/internal/eventStream.ts +208 -0
- package/src/internal/sigv4.ts +154 -0
- package/src/internal/utilities.ts +15 -17
- package/AmazonBedrockClient/package.json +0 -6
- package/AmazonBedrockConfig/package.json +0 -6
- package/AmazonBedrockLanguageModel/package.json +0 -6
- package/AmazonBedrockSchema/package.json +0 -6
- package/AmazonBedrockTool/package.json +0 -6
- package/EventStreamEncoding/package.json +0 -6
- package/dist/cjs/AmazonBedrockClient.js +0 -191
- package/dist/cjs/AmazonBedrockClient.js.map +0 -1
- package/dist/cjs/AmazonBedrockConfig.js +0 -30
- package/dist/cjs/AmazonBedrockConfig.js.map +0 -1
- package/dist/cjs/AmazonBedrockLanguageModel.js +0 -1051
- package/dist/cjs/AmazonBedrockLanguageModel.js.map +0 -1
- package/dist/cjs/AmazonBedrockSchema.js +0 -800
- package/dist/cjs/AmazonBedrockSchema.js.map +0 -1
- package/dist/cjs/AmazonBedrockTool.js +0 -53
- package/dist/cjs/AmazonBedrockTool.js.map +0 -1
- package/dist/cjs/EventStreamEncoding.js +0 -86
- package/dist/cjs/EventStreamEncoding.js.map +0 -1
- package/dist/cjs/index.js +0 -20
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/internal/utilities.js +0 -27
- package/dist/cjs/internal/utilities.js.map +0 -1
- package/dist/dts/AmazonBedrockClient.d.ts +0 -95
- package/dist/dts/AmazonBedrockClient.d.ts.map +0 -1
- package/dist/dts/AmazonBedrockConfig.d.ts +0 -47
- package/dist/dts/AmazonBedrockConfig.d.ts.map +0 -1
- package/dist/dts/AmazonBedrockLanguageModel.d.ts +0 -147
- package/dist/dts/AmazonBedrockLanguageModel.d.ts.map +0 -1
- package/dist/dts/AmazonBedrockSchema.d.ts +0 -1875
- package/dist/dts/AmazonBedrockSchema.d.ts.map +0 -1
- package/dist/dts/AmazonBedrockTool.d.ts +0 -206
- package/dist/dts/AmazonBedrockTool.d.ts.map +0 -1
- package/dist/dts/EventStreamEncoding.d.ts +0 -16
- package/dist/dts/EventStreamEncoding.d.ts.map +0 -1
- package/dist/dts/index.d.ts +0 -25
- package/dist/dts/index.d.ts.map +0 -1
- package/dist/esm/AmazonBedrockClient.js +0 -179
- package/dist/esm/AmazonBedrockClient.js.map +0 -1
- package/dist/esm/AmazonBedrockConfig.js +0 -22
- package/dist/esm/AmazonBedrockConfig.js.map +0 -1
- package/dist/esm/AmazonBedrockLanguageModel.js +0 -1040
- package/dist/esm/AmazonBedrockLanguageModel.js.map +0 -1
- package/dist/esm/AmazonBedrockSchema.js +0 -731
- package/dist/esm/AmazonBedrockSchema.js.map +0 -1
- package/dist/esm/AmazonBedrockTool.js +0 -45
- package/dist/esm/AmazonBedrockTool.js.map +0 -1
- package/dist/esm/EventStreamEncoding.js +0 -78
- package/dist/esm/EventStreamEncoding.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/internal/utilities.js +0 -19
- package/dist/esm/internal/utilities.js.map +0 -1
- package/dist/esm/package.json +0 -4
- package/index/package.json +0 -6
- package/src/AmazonBedrockTool.ts +0 -273
- package/src/EventStreamEncoding.ts +0 -118
- /package/dist/{dts/internal → internal}/utilities.d.ts +0 -0
|
@@ -0,0 +1,918 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `AmazonBedrockSchema` module defines handwritten schemas for the subset
|
|
3
|
+
* of the Amazon Bedrock Converse API that this provider uses: the Converse
|
|
4
|
+
* request and response, and the ConverseStream events.
|
|
5
|
+
*
|
|
6
|
+
* **Details**
|
|
7
|
+
*
|
|
8
|
+
* The Smithy model of the Converse API expresses most content as unions. A
|
|
9
|
+
* union is modelled here as a struct whose members are all optional. Every
|
|
10
|
+
* struct that Bedrock sends back keeps the fields this provider does not
|
|
11
|
+
* model, so a new union member or field reaches a low-level consumer instead
|
|
12
|
+
* of failing the whole response or being dropped. Blobs travel as base64
|
|
13
|
+
* strings, as in the JSON protocol.
|
|
14
|
+
*
|
|
15
|
+
* @stability unstable
|
|
16
|
+
* @since 4.0.0
|
|
17
|
+
*/
|
|
18
|
+
import type * as Brand from "effect/Brand";
|
|
19
|
+
import * as Schema from "effect/Schema";
|
|
20
|
+
/**
|
|
21
|
+
* The stop reasons that the Smithy model of the Converse API names.
|
|
22
|
+
*
|
|
23
|
+
* @stability unstable
|
|
24
|
+
* @category schemas
|
|
25
|
+
* @since 4.0.0
|
|
26
|
+
*/
|
|
27
|
+
export declare const KnownStopReason: Schema.Literals<readonly ["end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered", "malformed_model_output", "malformed_tool_use", "model_context_window_exceeded"]>;
|
|
28
|
+
/**
|
|
29
|
+
* The type of {@link KnownStopReason}.
|
|
30
|
+
*
|
|
31
|
+
* @stability unstable
|
|
32
|
+
* @category schemas
|
|
33
|
+
* @since 4.0.0
|
|
34
|
+
*/
|
|
35
|
+
export type KnownStopReason = typeof KnownStopReason.Type;
|
|
36
|
+
/**
|
|
37
|
+
* The reason the model stopped generating a response. Any string decodes, so a
|
|
38
|
+
* reason that Bedrock adds later does not fail the response.
|
|
39
|
+
*
|
|
40
|
+
* @stability unstable
|
|
41
|
+
* @category schemas
|
|
42
|
+
* @since 4.0.0
|
|
43
|
+
*/
|
|
44
|
+
export declare const StopReason: Schema.Union<readonly [Schema.Literals<readonly ["end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered", "malformed_model_output", "malformed_tool_use", "model_context_window_exceeded"]>, Schema.StringForLiteralAutocomplete]>;
|
|
45
|
+
/**
|
|
46
|
+
* The type of {@link StopReason}.
|
|
47
|
+
*
|
|
48
|
+
* @stability unstable
|
|
49
|
+
* @category schemas
|
|
50
|
+
* @since 4.0.0
|
|
51
|
+
*/
|
|
52
|
+
export type StopReason = typeof StopReason.Type;
|
|
53
|
+
/**
|
|
54
|
+
* Token usage statistics returned by the Converse API.
|
|
55
|
+
*
|
|
56
|
+
* @stability unstable
|
|
57
|
+
* @category schemas
|
|
58
|
+
* @since 4.0.0
|
|
59
|
+
*/
|
|
60
|
+
export declare const TokenUsage: Schema.StructWithRest<Schema.Struct<{
|
|
61
|
+
readonly inputTokens: Schema.Int;
|
|
62
|
+
readonly outputTokens: Schema.Int;
|
|
63
|
+
readonly totalTokens: Schema.Int;
|
|
64
|
+
readonly cacheReadInputTokens: Schema.optional<Schema.Int>;
|
|
65
|
+
readonly cacheWriteInputTokens: Schema.optional<Schema.Int>;
|
|
66
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
67
|
+
/**
|
|
68
|
+
* The type of {@link TokenUsage}.
|
|
69
|
+
*
|
|
70
|
+
* @stability unstable
|
|
71
|
+
* @category schemas
|
|
72
|
+
* @since 4.0.0
|
|
73
|
+
*/
|
|
74
|
+
export type TokenUsage = typeof TokenUsage.Type;
|
|
75
|
+
/**
|
|
76
|
+
* A tool-use content block: the model's request to invoke a tool.
|
|
77
|
+
*
|
|
78
|
+
* @stability unstable
|
|
79
|
+
* @category schemas
|
|
80
|
+
* @since 4.0.0
|
|
81
|
+
*/
|
|
82
|
+
export declare const ToolUseBlock: Schema.StructWithRest<Schema.Struct<{
|
|
83
|
+
readonly toolUseId: Schema.String;
|
|
84
|
+
readonly name: Schema.String;
|
|
85
|
+
readonly input: Schema.Unknown;
|
|
86
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
87
|
+
/**
|
|
88
|
+
* One piece of the content of a tool result: text or a JSON document.
|
|
89
|
+
*
|
|
90
|
+
* @stability unstable
|
|
91
|
+
* @category schemas
|
|
92
|
+
* @since 4.0.0
|
|
93
|
+
*/
|
|
94
|
+
export declare const ToolResultContentBlock: Schema.StructWithRest<Schema.Struct<{
|
|
95
|
+
readonly text: Schema.optional<Schema.String>;
|
|
96
|
+
readonly json: Schema.optional<Schema.Unknown>;
|
|
97
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
98
|
+
/**
|
|
99
|
+
* A tool-result content block: the outcome of a tool invocation fed back to
|
|
100
|
+
* the model.
|
|
101
|
+
*
|
|
102
|
+
* @stability unstable
|
|
103
|
+
* @category schemas
|
|
104
|
+
* @since 4.0.0
|
|
105
|
+
*/
|
|
106
|
+
export declare const ToolResultBlock: Schema.StructWithRest<Schema.Struct<{
|
|
107
|
+
readonly toolUseId: Schema.String;
|
|
108
|
+
readonly content: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
109
|
+
readonly text: Schema.optional<Schema.String>;
|
|
110
|
+
readonly json: Schema.optional<Schema.Unknown>;
|
|
111
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
112
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["success", "error"]>>;
|
|
113
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
114
|
+
/**
|
|
115
|
+
* The reasoning text produced by a model, with the signature that verifies
|
|
116
|
+
* the model generated it. The signature must be echoed back unmodified when
|
|
117
|
+
* the block is sent in a later turn.
|
|
118
|
+
*
|
|
119
|
+
* @stability unstable
|
|
120
|
+
* @category schemas
|
|
121
|
+
* @since 4.0.0
|
|
122
|
+
*/
|
|
123
|
+
export declare const ReasoningTextBlock: Schema.StructWithRest<Schema.Struct<{
|
|
124
|
+
readonly text: Schema.String;
|
|
125
|
+
readonly signature: Schema.optional<Schema.String>;
|
|
126
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
127
|
+
/**
|
|
128
|
+
* A reasoning content block: either reasoning text or reasoning that the
|
|
129
|
+
* model provider redacted, as a base64 string.
|
|
130
|
+
*
|
|
131
|
+
* @stability unstable
|
|
132
|
+
* @category schemas
|
|
133
|
+
* @since 4.0.0
|
|
134
|
+
*/
|
|
135
|
+
export declare const ReasoningContentBlock: Schema.StructWithRest<Schema.Struct<{
|
|
136
|
+
readonly reasoningText: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
137
|
+
readonly text: Schema.String;
|
|
138
|
+
readonly signature: Schema.optional<Schema.String>;
|
|
139
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
140
|
+
readonly redactedContent: Schema.optional<Schema.String>;
|
|
141
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
142
|
+
/**
|
|
143
|
+
* A cache point marking the end of a reusable prefix of a request.
|
|
144
|
+
*
|
|
145
|
+
* **Details**
|
|
146
|
+
*
|
|
147
|
+
* Converse caches everything preceding the block, so a cache point is its own
|
|
148
|
+
* content block appended after the content it should cover. `ttl` opts into
|
|
149
|
+
* extended caching; when omitted Bedrock uses the default lifetime.
|
|
150
|
+
* Bedrock does not send cache points back, so unlike the response structs
|
|
151
|
+
* this one keeps no unmodelled fields and stays exact as a request option.
|
|
152
|
+
*
|
|
153
|
+
* @stability unstable
|
|
154
|
+
* @category schemas
|
|
155
|
+
* @since 4.0.0
|
|
156
|
+
*/
|
|
157
|
+
export declare const CachePointBlock: Schema.Struct<{
|
|
158
|
+
readonly type: Schema.Literal<"default">;
|
|
159
|
+
readonly ttl: Schema.optionalKey<Schema.Literals<readonly ["5m", "1h"]>>;
|
|
160
|
+
}>;
|
|
161
|
+
/**
|
|
162
|
+
* The type of {@link CachePointBlock}.
|
|
163
|
+
*
|
|
164
|
+
* @stability unstable
|
|
165
|
+
* @category schemas
|
|
166
|
+
* @since 4.0.0
|
|
167
|
+
*/
|
|
168
|
+
export type CachePointBlock = typeof CachePointBlock.Type;
|
|
169
|
+
/**
|
|
170
|
+
* The image formats the Converse API accepts.
|
|
171
|
+
*
|
|
172
|
+
* @stability unstable
|
|
173
|
+
* @category schemas
|
|
174
|
+
* @since 4.0.0
|
|
175
|
+
*/
|
|
176
|
+
export declare const ImageFormat: Schema.Literals<readonly ["png", "jpeg", "gif", "webp"]>;
|
|
177
|
+
/**
|
|
178
|
+
* An image content block. The image is sent as base64 bytes.
|
|
179
|
+
*
|
|
180
|
+
* @stability unstable
|
|
181
|
+
* @category schemas
|
|
182
|
+
* @since 4.0.0
|
|
183
|
+
*/
|
|
184
|
+
export declare const ImageBlock: Schema.StructWithRest<Schema.Struct<{
|
|
185
|
+
readonly format: Schema.Literals<readonly ["png", "jpeg", "gif", "webp"]>;
|
|
186
|
+
readonly source: Schema.StructWithRest<Schema.Struct<{
|
|
187
|
+
readonly bytes: Schema.String;
|
|
188
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
189
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
190
|
+
/**
|
|
191
|
+
* The document formats the Converse API accepts.
|
|
192
|
+
*
|
|
193
|
+
* @stability unstable
|
|
194
|
+
* @category schemas
|
|
195
|
+
* @since 4.0.0
|
|
196
|
+
*/
|
|
197
|
+
export declare const DocumentFormat: Schema.Literals<readonly ["pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"]>;
|
|
198
|
+
/**
|
|
199
|
+
* A document content block. Bedrock restricts `name` to alphanumerics, single
|
|
200
|
+
* runs of whitespace, hyphens, parentheses and square brackets.
|
|
201
|
+
*
|
|
202
|
+
* @stability unstable
|
|
203
|
+
* @category schemas
|
|
204
|
+
* @since 4.0.0
|
|
205
|
+
*/
|
|
206
|
+
export declare const DocumentBlock: Schema.StructWithRest<Schema.Struct<{
|
|
207
|
+
readonly format: Schema.Literals<readonly ["pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"]>;
|
|
208
|
+
readonly name: Schema.String;
|
|
209
|
+
readonly source: Schema.StructWithRest<Schema.Struct<{
|
|
210
|
+
readonly bytes: Schema.String;
|
|
211
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
212
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
213
|
+
/**
|
|
214
|
+
* A content block within a Converse message. A block member this provider
|
|
215
|
+
* does not model, such as `citationsContent`, is kept as it was sent.
|
|
216
|
+
*
|
|
217
|
+
* @stability unstable
|
|
218
|
+
* @category schemas
|
|
219
|
+
* @since 4.0.0
|
|
220
|
+
*/
|
|
221
|
+
export declare const ContentBlock: Schema.StructWithRest<Schema.Struct<{
|
|
222
|
+
readonly text: Schema.optional<Schema.String>;
|
|
223
|
+
readonly toolUse: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
224
|
+
readonly toolUseId: Schema.String;
|
|
225
|
+
readonly name: Schema.String;
|
|
226
|
+
readonly input: Schema.Unknown;
|
|
227
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
228
|
+
readonly toolResult: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
229
|
+
readonly toolUseId: Schema.String;
|
|
230
|
+
readonly content: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
231
|
+
readonly text: Schema.optional<Schema.String>;
|
|
232
|
+
readonly json: Schema.optional<Schema.Unknown>;
|
|
233
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
234
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["success", "error"]>>;
|
|
235
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
236
|
+
readonly reasoningContent: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
237
|
+
readonly reasoningText: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
238
|
+
readonly text: Schema.String;
|
|
239
|
+
readonly signature: Schema.optional<Schema.String>;
|
|
240
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
241
|
+
readonly redactedContent: Schema.optional<Schema.String>;
|
|
242
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
243
|
+
readonly image: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
244
|
+
readonly format: Schema.Literals<readonly ["png", "jpeg", "gif", "webp"]>;
|
|
245
|
+
readonly source: Schema.StructWithRest<Schema.Struct<{
|
|
246
|
+
readonly bytes: Schema.String;
|
|
247
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
248
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
249
|
+
readonly document: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
250
|
+
readonly format: Schema.Literals<readonly ["pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"]>;
|
|
251
|
+
readonly name: Schema.String;
|
|
252
|
+
readonly source: Schema.StructWithRest<Schema.Struct<{
|
|
253
|
+
readonly bytes: Schema.String;
|
|
254
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
255
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
256
|
+
readonly cachePoint: Schema.optional<Schema.Struct<{
|
|
257
|
+
readonly type: Schema.Literal<"default">;
|
|
258
|
+
readonly ttl: Schema.optionalKey<Schema.Literals<readonly ["5m", "1h"]>>;
|
|
259
|
+
}>>;
|
|
260
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
261
|
+
/**
|
|
262
|
+
* A message within a Converse conversation.
|
|
263
|
+
*
|
|
264
|
+
* @stability unstable
|
|
265
|
+
* @category schemas
|
|
266
|
+
* @since 4.0.0
|
|
267
|
+
*/
|
|
268
|
+
export declare const Message: Schema.StructWithRest<Schema.Struct<{
|
|
269
|
+
readonly role: Schema.Literals<readonly ["user", "assistant"]>;
|
|
270
|
+
readonly content: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
271
|
+
readonly text: Schema.optional<Schema.String>;
|
|
272
|
+
readonly toolUse: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
273
|
+
readonly toolUseId: Schema.String;
|
|
274
|
+
readonly name: Schema.String;
|
|
275
|
+
readonly input: Schema.Unknown;
|
|
276
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
277
|
+
readonly toolResult: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
278
|
+
readonly toolUseId: Schema.String;
|
|
279
|
+
readonly content: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
280
|
+
readonly text: Schema.optional<Schema.String>;
|
|
281
|
+
readonly json: Schema.optional<Schema.Unknown>;
|
|
282
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
283
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["success", "error"]>>;
|
|
284
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
285
|
+
readonly reasoningContent: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
286
|
+
readonly reasoningText: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
287
|
+
readonly text: Schema.String;
|
|
288
|
+
readonly signature: Schema.optional<Schema.String>;
|
|
289
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
290
|
+
readonly redactedContent: Schema.optional<Schema.String>;
|
|
291
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
292
|
+
readonly image: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
293
|
+
readonly format: Schema.Literals<readonly ["png", "jpeg", "gif", "webp"]>;
|
|
294
|
+
readonly source: Schema.StructWithRest<Schema.Struct<{
|
|
295
|
+
readonly bytes: Schema.String;
|
|
296
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
297
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
298
|
+
readonly document: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
299
|
+
readonly format: Schema.Literals<readonly ["pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"]>;
|
|
300
|
+
readonly name: Schema.String;
|
|
301
|
+
readonly source: Schema.StructWithRest<Schema.Struct<{
|
|
302
|
+
readonly bytes: Schema.String;
|
|
303
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
304
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
305
|
+
readonly cachePoint: Schema.optional<Schema.Struct<{
|
|
306
|
+
readonly type: Schema.Literal<"default">;
|
|
307
|
+
readonly ttl: Schema.optionalKey<Schema.Literals<readonly ["5m", "1h"]>>;
|
|
308
|
+
}>>;
|
|
309
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
310
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
311
|
+
/**
|
|
312
|
+
* A system content block: system text or a cache point.
|
|
313
|
+
*
|
|
314
|
+
* @stability unstable
|
|
315
|
+
* @category schemas
|
|
316
|
+
* @since 4.0.0
|
|
317
|
+
*/
|
|
318
|
+
export declare const SystemContentBlock: Schema.Struct<{
|
|
319
|
+
readonly text: Schema.optional<Schema.String>;
|
|
320
|
+
readonly cachePoint: Schema.optional<Schema.Struct<{
|
|
321
|
+
readonly type: Schema.Literal<"default">;
|
|
322
|
+
readonly ttl: Schema.optionalKey<Schema.Literals<readonly ["5m", "1h"]>>;
|
|
323
|
+
}>>;
|
|
324
|
+
}>;
|
|
325
|
+
/**
|
|
326
|
+
* Base inference parameters to pass to a model in a Converse call.
|
|
327
|
+
*
|
|
328
|
+
* @stability unstable
|
|
329
|
+
* @category schemas
|
|
330
|
+
* @since 4.0.0
|
|
331
|
+
*/
|
|
332
|
+
export declare const InferenceConfiguration: Schema.Struct<{
|
|
333
|
+
readonly maxTokens: Schema.optional<Schema.Int>;
|
|
334
|
+
readonly stopSequences: Schema.optional<Schema.$Array<Schema.String>>;
|
|
335
|
+
readonly temperature: Schema.optional<Schema.Number>;
|
|
336
|
+
readonly topP: Schema.optional<Schema.Number>;
|
|
337
|
+
}>;
|
|
338
|
+
/**
|
|
339
|
+
* The JSON Schema specification of a tool the model may call.
|
|
340
|
+
*
|
|
341
|
+
* @stability unstable
|
|
342
|
+
* @category schemas
|
|
343
|
+
* @since 4.0.0
|
|
344
|
+
*/
|
|
345
|
+
export declare const ToolSpecification: Schema.Struct<{
|
|
346
|
+
readonly name: Schema.String;
|
|
347
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
348
|
+
readonly inputSchema: Schema.Struct<{
|
|
349
|
+
readonly json: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
350
|
+
}>;
|
|
351
|
+
}>;
|
|
352
|
+
/**
|
|
353
|
+
* A tool entry within a {@link ToolConfiguration}: a tool specification, or a
|
|
354
|
+
* cache point marking the end of the cacheable prefix of the tool list.
|
|
355
|
+
*
|
|
356
|
+
* @stability unstable
|
|
357
|
+
* @category schemas
|
|
358
|
+
* @since 4.0.0
|
|
359
|
+
*/
|
|
360
|
+
export declare const Tool: Schema.Struct<{
|
|
361
|
+
readonly toolSpec: Schema.optional<Schema.Struct<{
|
|
362
|
+
readonly name: Schema.String;
|
|
363
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
364
|
+
readonly inputSchema: Schema.Struct<{
|
|
365
|
+
readonly json: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
366
|
+
}>;
|
|
367
|
+
}>>;
|
|
368
|
+
readonly cachePoint: Schema.optional<Schema.Struct<{
|
|
369
|
+
readonly type: Schema.Literal<"default">;
|
|
370
|
+
readonly ttl: Schema.optionalKey<Schema.Literals<readonly ["5m", "1h"]>>;
|
|
371
|
+
}>>;
|
|
372
|
+
}>;
|
|
373
|
+
/**
|
|
374
|
+
* Controls how the model selects a tool: let it decide (`auto`), force any
|
|
375
|
+
* tool (`any`), or force a specific tool (`tool`).
|
|
376
|
+
*
|
|
377
|
+
* @stability unstable
|
|
378
|
+
* @category schemas
|
|
379
|
+
* @since 4.0.0
|
|
380
|
+
*/
|
|
381
|
+
export declare const ToolChoice: Schema.Union<readonly [Schema.Struct<{
|
|
382
|
+
readonly auto: Schema.Struct<{}>;
|
|
383
|
+
}>, Schema.Struct<{
|
|
384
|
+
readonly any: Schema.Struct<{}>;
|
|
385
|
+
}>, Schema.Struct<{
|
|
386
|
+
readonly tool: Schema.Struct<{
|
|
387
|
+
readonly name: Schema.String;
|
|
388
|
+
}>;
|
|
389
|
+
}>]>;
|
|
390
|
+
/**
|
|
391
|
+
* The type of {@link ToolChoice}.
|
|
392
|
+
*
|
|
393
|
+
* @stability unstable
|
|
394
|
+
* @category schemas
|
|
395
|
+
* @since 4.0.0
|
|
396
|
+
*/
|
|
397
|
+
export type ToolChoice = typeof ToolChoice.Type;
|
|
398
|
+
/**
|
|
399
|
+
* The tool configuration for a Converse request.
|
|
400
|
+
*
|
|
401
|
+
* @stability unstable
|
|
402
|
+
* @category schemas
|
|
403
|
+
* @since 4.0.0
|
|
404
|
+
*/
|
|
405
|
+
export declare const ToolConfiguration: Schema.Struct<{
|
|
406
|
+
readonly tools: Schema.$Array<Schema.Struct<{
|
|
407
|
+
readonly toolSpec: Schema.optional<Schema.Struct<{
|
|
408
|
+
readonly name: Schema.String;
|
|
409
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
410
|
+
readonly inputSchema: Schema.Struct<{
|
|
411
|
+
readonly json: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
412
|
+
}>;
|
|
413
|
+
}>>;
|
|
414
|
+
readonly cachePoint: Schema.optional<Schema.Struct<{
|
|
415
|
+
readonly type: Schema.Literal<"default">;
|
|
416
|
+
readonly ttl: Schema.optionalKey<Schema.Literals<readonly ["5m", "1h"]>>;
|
|
417
|
+
}>>;
|
|
418
|
+
}>>;
|
|
419
|
+
readonly toolChoice: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
420
|
+
readonly auto: Schema.Struct<{}>;
|
|
421
|
+
}>, Schema.Struct<{
|
|
422
|
+
readonly any: Schema.Struct<{}>;
|
|
423
|
+
}>, Schema.Struct<{
|
|
424
|
+
readonly tool: Schema.Struct<{
|
|
425
|
+
readonly name: Schema.String;
|
|
426
|
+
}>;
|
|
427
|
+
}>]>>;
|
|
428
|
+
}>;
|
|
429
|
+
/**
|
|
430
|
+
* A JSON Schema the model's output must conform to. `schema` is the JSON
|
|
431
|
+
* Schema serialized to a string, as Converse requires.
|
|
432
|
+
*
|
|
433
|
+
* @stability unstable
|
|
434
|
+
* @category schemas
|
|
435
|
+
* @since 4.0.0
|
|
436
|
+
*/
|
|
437
|
+
export declare const JsonSchemaDefinition: Schema.Struct<{
|
|
438
|
+
readonly schema: Schema.String;
|
|
439
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
440
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
441
|
+
}>;
|
|
442
|
+
/**
|
|
443
|
+
* Structured output parameters for a Converse request.
|
|
444
|
+
*
|
|
445
|
+
* @stability unstable
|
|
446
|
+
* @category schemas
|
|
447
|
+
* @since 4.0.0
|
|
448
|
+
*/
|
|
449
|
+
export declare const OutputFormat: Schema.Struct<{
|
|
450
|
+
readonly type: Schema.Literal<"json_schema">;
|
|
451
|
+
readonly structure: Schema.Struct<{
|
|
452
|
+
readonly jsonSchema: Schema.Struct<{
|
|
453
|
+
readonly schema: Schema.String;
|
|
454
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
455
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
456
|
+
}>;
|
|
457
|
+
}>;
|
|
458
|
+
}>;
|
|
459
|
+
/**
|
|
460
|
+
* Output configuration for a Converse request: native structured output
|
|
461
|
+
* (`textFormat`) and the model's effort level (`effort`, on the models that
|
|
462
|
+
* accept it).
|
|
463
|
+
*
|
|
464
|
+
* @stability unstable
|
|
465
|
+
* @category schemas
|
|
466
|
+
* @since 4.0.0
|
|
467
|
+
*/
|
|
468
|
+
export declare const OutputConfig: Schema.Struct<{
|
|
469
|
+
readonly textFormat: Schema.optionalKey<Schema.Struct<{
|
|
470
|
+
readonly type: Schema.Literal<"json_schema">;
|
|
471
|
+
readonly structure: Schema.Struct<{
|
|
472
|
+
readonly jsonSchema: Schema.Struct<{
|
|
473
|
+
readonly schema: Schema.String;
|
|
474
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
475
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
476
|
+
}>;
|
|
477
|
+
}>;
|
|
478
|
+
}>>;
|
|
479
|
+
readonly effort: Schema.optionalKey<Schema.String>;
|
|
480
|
+
}>;
|
|
481
|
+
/**
|
|
482
|
+
* The guardrail of a Converse request. `streamProcessingMode` applies to
|
|
483
|
+
* ConverseStream only and is removed from Converse requests.
|
|
484
|
+
*
|
|
485
|
+
* @stability unstable
|
|
486
|
+
* @category schemas
|
|
487
|
+
* @since 4.0.0
|
|
488
|
+
*/
|
|
489
|
+
export declare const GuardrailConfiguration: Schema.Struct<{
|
|
490
|
+
readonly guardrailIdentifier: Schema.String;
|
|
491
|
+
readonly guardrailVersion: Schema.String;
|
|
492
|
+
readonly trace: Schema.optionalKey<Schema.Literals<readonly ["enabled", "disabled", "enabled_full"]>>;
|
|
493
|
+
readonly streamProcessingMode: Schema.optionalKey<Schema.Literals<readonly ["sync", "async"]>>;
|
|
494
|
+
}>;
|
|
495
|
+
/**
|
|
496
|
+
* The request payload for the Converse and ConverseStream operations.
|
|
497
|
+
*
|
|
498
|
+
* **Details**
|
|
499
|
+
*
|
|
500
|
+
* `modelId` travels in the URL, not in the body. `additionalModelRequestFields`
|
|
501
|
+
* carries inference parameters specific to the target model; extended
|
|
502
|
+
* thinking on an Anthropic model is enabled through it.
|
|
503
|
+
*
|
|
504
|
+
* @stability unstable
|
|
505
|
+
* @category schemas
|
|
506
|
+
* @since 4.0.0
|
|
507
|
+
*/
|
|
508
|
+
export declare const ConverseRequest: Schema.Struct<{
|
|
509
|
+
readonly modelId: Schema.String;
|
|
510
|
+
readonly messages: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
511
|
+
readonly role: Schema.Literals<readonly ["user", "assistant"]>;
|
|
512
|
+
readonly content: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
513
|
+
readonly text: Schema.optional<Schema.String>;
|
|
514
|
+
readonly toolUse: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
515
|
+
readonly toolUseId: Schema.String;
|
|
516
|
+
readonly name: Schema.String;
|
|
517
|
+
readonly input: Schema.Unknown;
|
|
518
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
519
|
+
readonly toolResult: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
520
|
+
readonly toolUseId: Schema.String;
|
|
521
|
+
readonly content: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
522
|
+
readonly text: Schema.optional<Schema.String>;
|
|
523
|
+
readonly json: Schema.optional<Schema.Unknown>;
|
|
524
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
525
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["success", "error"]>>;
|
|
526
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
527
|
+
readonly reasoningContent: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
528
|
+
readonly reasoningText: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
529
|
+
readonly text: Schema.String;
|
|
530
|
+
readonly signature: Schema.optional<Schema.String>;
|
|
531
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
532
|
+
readonly redactedContent: Schema.optional<Schema.String>;
|
|
533
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
534
|
+
readonly image: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
535
|
+
readonly format: Schema.Literals<readonly ["png", "jpeg", "gif", "webp"]>;
|
|
536
|
+
readonly source: Schema.StructWithRest<Schema.Struct<{
|
|
537
|
+
readonly bytes: Schema.String;
|
|
538
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
539
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
540
|
+
readonly document: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
541
|
+
readonly format: Schema.Literals<readonly ["pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"]>;
|
|
542
|
+
readonly name: Schema.String;
|
|
543
|
+
readonly source: Schema.StructWithRest<Schema.Struct<{
|
|
544
|
+
readonly bytes: Schema.String;
|
|
545
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
546
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
547
|
+
readonly cachePoint: Schema.optional<Schema.Struct<{
|
|
548
|
+
readonly type: Schema.Literal<"default">;
|
|
549
|
+
readonly ttl: Schema.optionalKey<Schema.Literals<readonly ["5m", "1h"]>>;
|
|
550
|
+
}>>;
|
|
551
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
552
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
553
|
+
readonly system: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
554
|
+
readonly text: Schema.optional<Schema.String>;
|
|
555
|
+
readonly cachePoint: Schema.optional<Schema.Struct<{
|
|
556
|
+
readonly type: Schema.Literal<"default">;
|
|
557
|
+
readonly ttl: Schema.optionalKey<Schema.Literals<readonly ["5m", "1h"]>>;
|
|
558
|
+
}>>;
|
|
559
|
+
}>>>;
|
|
560
|
+
readonly toolConfig: Schema.optionalKey<Schema.Struct<{
|
|
561
|
+
readonly tools: Schema.$Array<Schema.Struct<{
|
|
562
|
+
readonly toolSpec: Schema.optional<Schema.Struct<{
|
|
563
|
+
readonly name: Schema.String;
|
|
564
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
565
|
+
readonly inputSchema: Schema.Struct<{
|
|
566
|
+
readonly json: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
567
|
+
}>;
|
|
568
|
+
}>>;
|
|
569
|
+
readonly cachePoint: Schema.optional<Schema.Struct<{
|
|
570
|
+
readonly type: Schema.Literal<"default">;
|
|
571
|
+
readonly ttl: Schema.optionalKey<Schema.Literals<readonly ["5m", "1h"]>>;
|
|
572
|
+
}>>;
|
|
573
|
+
}>>;
|
|
574
|
+
readonly toolChoice: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
575
|
+
readonly auto: Schema.Struct<{}>;
|
|
576
|
+
}>, Schema.Struct<{
|
|
577
|
+
readonly any: Schema.Struct<{}>;
|
|
578
|
+
}>, Schema.Struct<{
|
|
579
|
+
readonly tool: Schema.Struct<{
|
|
580
|
+
readonly name: Schema.String;
|
|
581
|
+
}>;
|
|
582
|
+
}>]>>;
|
|
583
|
+
}>>;
|
|
584
|
+
readonly inferenceConfig: Schema.optional<Schema.Struct<{
|
|
585
|
+
readonly maxTokens: Schema.optional<Schema.Int>;
|
|
586
|
+
readonly stopSequences: Schema.optional<Schema.$Array<Schema.String>>;
|
|
587
|
+
readonly temperature: Schema.optional<Schema.Number>;
|
|
588
|
+
readonly topP: Schema.optional<Schema.Number>;
|
|
589
|
+
}>>;
|
|
590
|
+
readonly outputConfig: Schema.optionalKey<Schema.Struct<{
|
|
591
|
+
readonly textFormat: Schema.optionalKey<Schema.Struct<{
|
|
592
|
+
readonly type: Schema.Literal<"json_schema">;
|
|
593
|
+
readonly structure: Schema.Struct<{
|
|
594
|
+
readonly jsonSchema: Schema.Struct<{
|
|
595
|
+
readonly schema: Schema.String;
|
|
596
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
597
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
598
|
+
}>;
|
|
599
|
+
}>;
|
|
600
|
+
}>>;
|
|
601
|
+
readonly effort: Schema.optionalKey<Schema.String>;
|
|
602
|
+
}>>;
|
|
603
|
+
readonly additionalModelRequestFields: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
604
|
+
readonly guardrailConfig: Schema.optional<Schema.Struct<{
|
|
605
|
+
readonly guardrailIdentifier: Schema.String;
|
|
606
|
+
readonly guardrailVersion: Schema.String;
|
|
607
|
+
readonly trace: Schema.optionalKey<Schema.Literals<readonly ["enabled", "disabled", "enabled_full"]>>;
|
|
608
|
+
readonly streamProcessingMode: Schema.optionalKey<Schema.Literals<readonly ["sync", "async"]>>;
|
|
609
|
+
}>>;
|
|
610
|
+
}>;
|
|
611
|
+
/**
|
|
612
|
+
* The type of {@link ConverseRequest}.
|
|
613
|
+
*
|
|
614
|
+
* @stability unstable
|
|
615
|
+
* @category schemas
|
|
616
|
+
* @since 4.0.0
|
|
617
|
+
*/
|
|
618
|
+
export type ConverseRequest = typeof ConverseRequest.Type;
|
|
619
|
+
/**
|
|
620
|
+
* Metrics about a Converse call.
|
|
621
|
+
*
|
|
622
|
+
* @stability unstable
|
|
623
|
+
* @category schemas
|
|
624
|
+
* @since 4.0.0
|
|
625
|
+
*/
|
|
626
|
+
export declare const ConverseMetrics: Schema.StructWithRest<Schema.Struct<{
|
|
627
|
+
readonly latencyMs: Schema.Number;
|
|
628
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
629
|
+
/**
|
|
630
|
+
* The response from a successful Converse call. `trace` and any field this
|
|
631
|
+
* provider does not model, such as `additionalModelResponseFields`, are kept
|
|
632
|
+
* as Bedrock sent them.
|
|
633
|
+
*
|
|
634
|
+
* @stability unstable
|
|
635
|
+
* @category schemas
|
|
636
|
+
* @since 4.0.0
|
|
637
|
+
*/
|
|
638
|
+
export declare const ConverseResponse: Schema.StructWithRest<Schema.Struct<{
|
|
639
|
+
readonly output: Schema.StructWithRest<Schema.Struct<{
|
|
640
|
+
readonly message: Schema.StructWithRest<Schema.Struct<{
|
|
641
|
+
readonly role: Schema.Literals<readonly ["user", "assistant"]>;
|
|
642
|
+
readonly content: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
643
|
+
readonly text: Schema.optional<Schema.String>;
|
|
644
|
+
readonly toolUse: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
645
|
+
readonly toolUseId: Schema.String;
|
|
646
|
+
readonly name: Schema.String;
|
|
647
|
+
readonly input: Schema.Unknown;
|
|
648
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
649
|
+
readonly toolResult: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
650
|
+
readonly toolUseId: Schema.String;
|
|
651
|
+
readonly content: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
652
|
+
readonly text: Schema.optional<Schema.String>;
|
|
653
|
+
readonly json: Schema.optional<Schema.Unknown>;
|
|
654
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
655
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["success", "error"]>>;
|
|
656
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
657
|
+
readonly reasoningContent: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
658
|
+
readonly reasoningText: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
659
|
+
readonly text: Schema.String;
|
|
660
|
+
readonly signature: Schema.optional<Schema.String>;
|
|
661
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
662
|
+
readonly redactedContent: Schema.optional<Schema.String>;
|
|
663
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
664
|
+
readonly image: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
665
|
+
readonly format: Schema.Literals<readonly ["png", "jpeg", "gif", "webp"]>;
|
|
666
|
+
readonly source: Schema.StructWithRest<Schema.Struct<{
|
|
667
|
+
readonly bytes: Schema.String;
|
|
668
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
669
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
670
|
+
readonly document: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
671
|
+
readonly format: Schema.Literals<readonly ["pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"]>;
|
|
672
|
+
readonly name: Schema.String;
|
|
673
|
+
readonly source: Schema.StructWithRest<Schema.Struct<{
|
|
674
|
+
readonly bytes: Schema.String;
|
|
675
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
676
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
677
|
+
readonly cachePoint: Schema.optional<Schema.Struct<{
|
|
678
|
+
readonly type: Schema.Literal<"default">;
|
|
679
|
+
readonly ttl: Schema.optionalKey<Schema.Literals<readonly ["5m", "1h"]>>;
|
|
680
|
+
}>>;
|
|
681
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
682
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
683
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
684
|
+
readonly usage: Schema.StructWithRest<Schema.Struct<{
|
|
685
|
+
readonly inputTokens: Schema.Int;
|
|
686
|
+
readonly outputTokens: Schema.Int;
|
|
687
|
+
readonly totalTokens: Schema.Int;
|
|
688
|
+
readonly cacheReadInputTokens: Schema.optional<Schema.Int>;
|
|
689
|
+
readonly cacheWriteInputTokens: Schema.optional<Schema.Int>;
|
|
690
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
691
|
+
readonly stopReason: Schema.Union<readonly [Schema.Literals<readonly ["end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered", "malformed_model_output", "malformed_tool_use", "model_context_window_exceeded"]>, Schema.StringForLiteralAutocomplete]>;
|
|
692
|
+
readonly metrics: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
693
|
+
readonly latencyMs: Schema.Number;
|
|
694
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
695
|
+
readonly trace: Schema.optional<Schema.Unknown>;
|
|
696
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
697
|
+
/**
|
|
698
|
+
* The type of {@link ConverseResponse}.
|
|
699
|
+
*
|
|
700
|
+
* @stability unstable
|
|
701
|
+
* @category schemas
|
|
702
|
+
* @since 4.0.0
|
|
703
|
+
*/
|
|
704
|
+
export type ConverseResponse = typeof ConverseResponse.Type;
|
|
705
|
+
/**
|
|
706
|
+
* The start of a streamed message.
|
|
707
|
+
*
|
|
708
|
+
* @stability unstable
|
|
709
|
+
* @category schemas
|
|
710
|
+
* @since 4.0.0
|
|
711
|
+
*/
|
|
712
|
+
export declare const MessageStartEvent: Schema.StructWithRest<Schema.Struct<{
|
|
713
|
+
readonly role: Schema.Literals<readonly ["user", "assistant"]>;
|
|
714
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
715
|
+
/**
|
|
716
|
+
* The start of a streamed content block. Tool-use blocks announce their id and
|
|
717
|
+
* name here; text and reasoning blocks start directly with deltas.
|
|
718
|
+
*
|
|
719
|
+
* @stability unstable
|
|
720
|
+
* @category schemas
|
|
721
|
+
* @since 4.0.0
|
|
722
|
+
*/
|
|
723
|
+
export declare const ContentBlockStartEvent: Schema.StructWithRest<Schema.Struct<{
|
|
724
|
+
readonly contentBlockIndex: Schema.Int;
|
|
725
|
+
readonly start: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
726
|
+
readonly toolUse: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
727
|
+
readonly toolUseId: Schema.String;
|
|
728
|
+
readonly name: Schema.String;
|
|
729
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
730
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
731
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
732
|
+
/**
|
|
733
|
+
* A delta within a streamed content block: text, a fragment of tool input
|
|
734
|
+
* JSON, or reasoning text, signature or redacted content. A delta member this
|
|
735
|
+
* provider does not model, such as `citation`, is kept as it was sent.
|
|
736
|
+
*
|
|
737
|
+
* @stability unstable
|
|
738
|
+
* @category schemas
|
|
739
|
+
* @since 4.0.0
|
|
740
|
+
*/
|
|
741
|
+
export declare const ContentBlockDelta: Schema.StructWithRest<Schema.Struct<{
|
|
742
|
+
readonly text: Schema.optional<Schema.String>;
|
|
743
|
+
readonly toolUse: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
744
|
+
readonly input: Schema.String;
|
|
745
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
746
|
+
readonly reasoningContent: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
747
|
+
readonly text: Schema.optional<Schema.String>;
|
|
748
|
+
readonly signature: Schema.optional<Schema.String>;
|
|
749
|
+
readonly redactedContent: Schema.optional<Schema.String>;
|
|
750
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
751
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
752
|
+
/**
|
|
753
|
+
* A streamed delta event for a content block.
|
|
754
|
+
*
|
|
755
|
+
* @stability unstable
|
|
756
|
+
* @category schemas
|
|
757
|
+
* @since 4.0.0
|
|
758
|
+
*/
|
|
759
|
+
export declare const ContentBlockDeltaEvent: Schema.StructWithRest<Schema.Struct<{
|
|
760
|
+
readonly contentBlockIndex: Schema.Int;
|
|
761
|
+
readonly delta: Schema.StructWithRest<Schema.Struct<{
|
|
762
|
+
readonly text: Schema.optional<Schema.String>;
|
|
763
|
+
readonly toolUse: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
764
|
+
readonly input: Schema.String;
|
|
765
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
766
|
+
readonly reasoningContent: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
767
|
+
readonly text: Schema.optional<Schema.String>;
|
|
768
|
+
readonly signature: Schema.optional<Schema.String>;
|
|
769
|
+
readonly redactedContent: Schema.optional<Schema.String>;
|
|
770
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
771
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
772
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
773
|
+
/**
|
|
774
|
+
* A streamed stop event for a content block.
|
|
775
|
+
*
|
|
776
|
+
* @stability unstable
|
|
777
|
+
* @category schemas
|
|
778
|
+
* @since 4.0.0
|
|
779
|
+
*/
|
|
780
|
+
export declare const ContentBlockStopEvent: Schema.StructWithRest<Schema.Struct<{
|
|
781
|
+
readonly contentBlockIndex: Schema.Int;
|
|
782
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
783
|
+
/**
|
|
784
|
+
* The stop event for a streamed message.
|
|
785
|
+
*
|
|
786
|
+
* @stability unstable
|
|
787
|
+
* @category schemas
|
|
788
|
+
* @since 4.0.0
|
|
789
|
+
*/
|
|
790
|
+
export declare const MessageStopEvent: Schema.StructWithRest<Schema.Struct<{
|
|
791
|
+
readonly stopReason: Schema.Union<readonly [Schema.Literals<readonly ["end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered", "malformed_model_output", "malformed_tool_use", "model_context_window_exceeded"]>, Schema.StringForLiteralAutocomplete]>;
|
|
792
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
793
|
+
/**
|
|
794
|
+
* The trailing metadata event of a stream, carrying usage and metrics. Bedrock
|
|
795
|
+
* sends it after `messageStop`.
|
|
796
|
+
*
|
|
797
|
+
* @stability unstable
|
|
798
|
+
* @category schemas
|
|
799
|
+
* @since 4.0.0
|
|
800
|
+
*/
|
|
801
|
+
export declare const ConverseStreamMetadataEvent: Schema.StructWithRest<Schema.Struct<{
|
|
802
|
+
readonly usage: Schema.StructWithRest<Schema.Struct<{
|
|
803
|
+
readonly inputTokens: Schema.Int;
|
|
804
|
+
readonly outputTokens: Schema.Int;
|
|
805
|
+
readonly totalTokens: Schema.Int;
|
|
806
|
+
readonly cacheReadInputTokens: Schema.optional<Schema.Int>;
|
|
807
|
+
readonly cacheWriteInputTokens: Schema.optional<Schema.Int>;
|
|
808
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
809
|
+
readonly metrics: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
810
|
+
readonly latencyMs: Schema.Number;
|
|
811
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
812
|
+
readonly trace: Schema.optional<Schema.Unknown>;
|
|
813
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
814
|
+
/**
|
|
815
|
+
* A ConverseStream event this provider does not model, keyed by its
|
|
816
|
+
* event-stream `:event-type` like every other event: `{ [eventType]: payload }`.
|
|
817
|
+
*
|
|
818
|
+
* **Details**
|
|
819
|
+
*
|
|
820
|
+
* The type declares no index signature, so an `in` check on a
|
|
821
|
+
* {@link ConverseStreamEvent} still narrows to the known event, and the brand
|
|
822
|
+
* keeps this member apart from them. Read the payload with `Object.entries`.
|
|
823
|
+
*
|
|
824
|
+
* @stability unstable
|
|
825
|
+
* @category models
|
|
826
|
+
* @since 4.0.0
|
|
827
|
+
*/
|
|
828
|
+
export type UnknownConverseStreamEvent = Brand.Branded<object, "UnknownConverseStreamEvent">;
|
|
829
|
+
/**
|
|
830
|
+
* Fallback schema for a ConverseStream event this provider does not model.
|
|
831
|
+
*
|
|
832
|
+
* @stability unstable
|
|
833
|
+
* @category schemas
|
|
834
|
+
* @since 4.0.0
|
|
835
|
+
*/
|
|
836
|
+
export declare const UnknownConverseStreamEvent: Schema.declare<UnknownConverseStreamEvent, UnknownConverseStreamEvent>;
|
|
837
|
+
/**
|
|
838
|
+
* A ConverseStream event, keyed by its event-stream `:event-type`, as the AWS
|
|
839
|
+
* SDK shapes it: `{ messageStart: ... }`, `{ contentBlockDelta: ... }` and so
|
|
840
|
+
* on. An event type this provider does not model decodes through
|
|
841
|
+
* {@link UnknownConverseStreamEvent}; a malformed known event still fails.
|
|
842
|
+
*
|
|
843
|
+
* @stability unstable
|
|
844
|
+
* @category schemas
|
|
845
|
+
* @since 4.0.0
|
|
846
|
+
*/
|
|
847
|
+
export declare const ConverseStreamEvent: Schema.Union<readonly [Schema.Struct<{
|
|
848
|
+
readonly messageStart: Schema.StructWithRest<Schema.Struct<{
|
|
849
|
+
readonly role: Schema.Literals<readonly ["user", "assistant"]>;
|
|
850
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
851
|
+
}>, Schema.Struct<{
|
|
852
|
+
readonly contentBlockStart: Schema.StructWithRest<Schema.Struct<{
|
|
853
|
+
readonly contentBlockIndex: Schema.Int;
|
|
854
|
+
readonly start: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
855
|
+
readonly toolUse: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
856
|
+
readonly toolUseId: Schema.String;
|
|
857
|
+
readonly name: Schema.String;
|
|
858
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
859
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
860
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
861
|
+
}>, Schema.Struct<{
|
|
862
|
+
readonly contentBlockDelta: Schema.StructWithRest<Schema.Struct<{
|
|
863
|
+
readonly contentBlockIndex: Schema.Int;
|
|
864
|
+
readonly delta: Schema.StructWithRest<Schema.Struct<{
|
|
865
|
+
readonly text: Schema.optional<Schema.String>;
|
|
866
|
+
readonly toolUse: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
867
|
+
readonly input: Schema.String;
|
|
868
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
869
|
+
readonly reasoningContent: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
870
|
+
readonly text: Schema.optional<Schema.String>;
|
|
871
|
+
readonly signature: Schema.optional<Schema.String>;
|
|
872
|
+
readonly redactedContent: Schema.optional<Schema.String>;
|
|
873
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
874
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
875
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
876
|
+
}>, Schema.Struct<{
|
|
877
|
+
readonly contentBlockStop: Schema.StructWithRest<Schema.Struct<{
|
|
878
|
+
readonly contentBlockIndex: Schema.Int;
|
|
879
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
880
|
+
}>, Schema.Struct<{
|
|
881
|
+
readonly messageStop: Schema.StructWithRest<Schema.Struct<{
|
|
882
|
+
readonly stopReason: Schema.Union<readonly [Schema.Literals<readonly ["end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered", "malformed_model_output", "malformed_tool_use", "model_context_window_exceeded"]>, Schema.StringForLiteralAutocomplete]>;
|
|
883
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
884
|
+
}>, Schema.Struct<{
|
|
885
|
+
readonly metadata: Schema.StructWithRest<Schema.Struct<{
|
|
886
|
+
readonly usage: Schema.StructWithRest<Schema.Struct<{
|
|
887
|
+
readonly inputTokens: Schema.Int;
|
|
888
|
+
readonly outputTokens: Schema.Int;
|
|
889
|
+
readonly totalTokens: Schema.Int;
|
|
890
|
+
readonly cacheReadInputTokens: Schema.optional<Schema.Int>;
|
|
891
|
+
readonly cacheWriteInputTokens: Schema.optional<Schema.Int>;
|
|
892
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
893
|
+
readonly metrics: Schema.optional<Schema.StructWithRest<Schema.Struct<{
|
|
894
|
+
readonly latencyMs: Schema.Number;
|
|
895
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
896
|
+
readonly trace: Schema.optional<Schema.Unknown>;
|
|
897
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
898
|
+
}>, Schema.declare<UnknownConverseStreamEvent, UnknownConverseStreamEvent>]>;
|
|
899
|
+
/**
|
|
900
|
+
* The type of {@link ConverseStreamEvent}.
|
|
901
|
+
*
|
|
902
|
+
* @stability unstable
|
|
903
|
+
* @category schemas
|
|
904
|
+
* @since 4.0.0
|
|
905
|
+
*/
|
|
906
|
+
export type ConverseStreamEvent = typeof ConverseStreamEvent.Type;
|
|
907
|
+
/**
|
|
908
|
+
* The body of an exception frame in a ConverseStream response, such as a
|
|
909
|
+
* `throttlingException`.
|
|
910
|
+
*
|
|
911
|
+
* @stability unstable
|
|
912
|
+
* @category schemas
|
|
913
|
+
* @since 4.0.0
|
|
914
|
+
*/
|
|
915
|
+
export declare const ConverseStreamException: Schema.StructWithRest<Schema.Struct<{
|
|
916
|
+
readonly message: Schema.optional<Schema.String>;
|
|
917
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
918
|
+
//# sourceMappingURL=AmazonBedrockSchema.d.ts.map
|