@wmaurer/effect-ai-amazon-bedrock 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +97 -16
- package/dist/AmazonBedrockClient.d.ts +135 -23
- package/dist/AmazonBedrockClient.d.ts.map +1 -1
- package/dist/AmazonBedrockClient.js +36 -92
- package/dist/AmazonBedrockClient.js.map +1 -1
- package/dist/AmazonBedrockConfig.d.ts +6 -6
- package/dist/AmazonBedrockConfig.js +4 -4
- package/dist/AmazonBedrockEventStream.d.ts +2 -2
- package/dist/AmazonBedrockEventStream.js +3 -3
- package/dist/AmazonBedrockLanguageModel.d.ts +22 -22
- package/dist/AmazonBedrockLanguageModel.d.ts.map +1 -1
- package/dist/AmazonBedrockLanguageModel.js +77 -28
- package/dist/AmazonBedrockLanguageModel.js.map +1 -1
- package/dist/AmazonBedrockSchema.d.ts +76 -55
- package/dist/AmazonBedrockSchema.d.ts.map +1 -1
- package/dist/AmazonBedrockSchema.js +63 -50
- package/dist/AmazonBedrockSchema.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/internal/credentials.d.ts +79 -0
- package/dist/internal/credentials.d.ts.map +1 -0
- package/dist/internal/credentials.js +241 -0
- package/dist/internal/credentials.js.map +1 -0
- package/dist/internal/errors.d.ts +2 -0
- package/dist/internal/errors.d.ts.map +1 -1
- package/dist/internal/errors.js +6 -0
- package/dist/internal/errors.js.map +1 -1
- package/dist/internal/utilities.d.ts +1 -1
- package/dist/internal/utilities.d.ts.map +1 -1
- package/dist/internal/utilities.js +4 -5
- package/dist/internal/utilities.js.map +1 -1
- package/package.json +1 -1
- package/src/AmazonBedrockClient.ts +184 -95
- package/src/AmazonBedrockConfig.ts +6 -6
- package/src/AmazonBedrockEventStream.ts +3 -3
- package/src/AmazonBedrockLanguageModel.ts +136 -62
- package/src/AmazonBedrockSchema.ts +77 -54
- package/src/index.ts +6 -6
- package/src/internal/credentials.ts +319 -0
- package/src/internal/errors.ts +5 -0
- package/src/internal/utilities.ts +7 -7
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* so decoding never fails on them.
|
|
12
12
|
*
|
|
13
13
|
* @stability unstable
|
|
14
|
-
* @since
|
|
14
|
+
* @since 0.1.0
|
|
15
15
|
*/
|
|
16
16
|
import * as Schema from "effect/Schema"
|
|
17
17
|
|
|
@@ -24,18 +24,18 @@ const makeIdentifier = (name: string) => `${prefix}/${name}`
|
|
|
24
24
|
*
|
|
25
25
|
* @stability unstable
|
|
26
26
|
* @category schemas
|
|
27
|
-
* @since
|
|
27
|
+
* @since 0.1.0
|
|
28
28
|
*/
|
|
29
29
|
export const IntZeroOrGreater = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* The
|
|
32
|
+
* The stop reasons that the Smithy model of the Converse API names.
|
|
33
33
|
*
|
|
34
34
|
* @stability unstable
|
|
35
35
|
* @category schemas
|
|
36
|
-
* @since
|
|
36
|
+
* @since 0.3.0
|
|
37
37
|
*/
|
|
38
|
-
export const
|
|
38
|
+
export const KnownStopReason = Schema.Literals([
|
|
39
39
|
"end_turn",
|
|
40
40
|
"tool_use",
|
|
41
41
|
"max_tokens",
|
|
@@ -47,12 +47,35 @@ export const StopReason = Schema.Literals([
|
|
|
47
47
|
"model_context_window_exceeded"
|
|
48
48
|
])
|
|
49
49
|
|
|
50
|
+
/**
|
|
51
|
+
* The type of {@link KnownStopReason}.
|
|
52
|
+
*
|
|
53
|
+
* @stability unstable
|
|
54
|
+
* @category schemas
|
|
55
|
+
* @since 0.3.0
|
|
56
|
+
*/
|
|
57
|
+
export type KnownStopReason = typeof KnownStopReason.Type
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The reason the model stopped generating a response.
|
|
61
|
+
*
|
|
62
|
+
* **Details**
|
|
63
|
+
*
|
|
64
|
+
* Any string decodes, so a reason that Bedrock adds later, or that a model
|
|
65
|
+
* returns outside the Smithy model, does not fail the response.
|
|
66
|
+
*
|
|
67
|
+
* @stability unstable
|
|
68
|
+
* @category schemas
|
|
69
|
+
* @since 0.1.0
|
|
70
|
+
*/
|
|
71
|
+
export const StopReason = Schema.Union([KnownStopReason, Schema.StringForLiteralAutocomplete])
|
|
72
|
+
|
|
50
73
|
/**
|
|
51
74
|
* The type of {@link StopReason}.
|
|
52
75
|
*
|
|
53
76
|
* @stability unstable
|
|
54
77
|
* @category schemas
|
|
55
|
-
* @since
|
|
78
|
+
* @since 0.1.0
|
|
56
79
|
*/
|
|
57
80
|
export type StopReason = typeof StopReason.Type
|
|
58
81
|
|
|
@@ -61,7 +84,7 @@ export type StopReason = typeof StopReason.Type
|
|
|
61
84
|
*
|
|
62
85
|
* @stability unstable
|
|
63
86
|
* @category schemas
|
|
64
|
-
* @since
|
|
87
|
+
* @since 0.1.0
|
|
65
88
|
*/
|
|
66
89
|
export class TokenUsage extends Schema.Class<TokenUsage>(makeIdentifier("TokenUsage"))({
|
|
67
90
|
inputTokens: IntZeroOrGreater,
|
|
@@ -80,7 +103,7 @@ export class TokenUsage extends Schema.Class<TokenUsage>(makeIdentifier("TokenUs
|
|
|
80
103
|
*
|
|
81
104
|
* @stability unstable
|
|
82
105
|
* @category schemas
|
|
83
|
-
* @since
|
|
106
|
+
* @since 0.1.0
|
|
84
107
|
*/
|
|
85
108
|
export class ToolUseBlock extends Schema.Class<ToolUseBlock>(makeIdentifier("ToolUseBlock"))({
|
|
86
109
|
toolUseId: Schema.String,
|
|
@@ -94,7 +117,7 @@ export class ToolUseBlock extends Schema.Class<ToolUseBlock>(makeIdentifier("Too
|
|
|
94
117
|
*
|
|
95
118
|
* @stability unstable
|
|
96
119
|
* @category schemas
|
|
97
|
-
* @since
|
|
120
|
+
* @since 0.1.0
|
|
98
121
|
*/
|
|
99
122
|
export class ToolResultBlock extends Schema.Class<ToolResultBlock>(makeIdentifier("ToolResultBlock"))({
|
|
100
123
|
toolUseId: Schema.String,
|
|
@@ -112,7 +135,7 @@ export class ToolResultBlock extends Schema.Class<ToolResultBlock>(makeIdentifie
|
|
|
112
135
|
*
|
|
113
136
|
* @stability unstable
|
|
114
137
|
* @category schemas
|
|
115
|
-
* @since
|
|
138
|
+
* @since 0.1.0
|
|
116
139
|
*/
|
|
117
140
|
export class ReasoningTextBlock extends Schema.Class<ReasoningTextBlock>(makeIdentifier("ReasoningTextBlock"))({
|
|
118
141
|
text: Schema.String,
|
|
@@ -131,7 +154,7 @@ export class ReasoningTextBlock extends Schema.Class<ReasoningTextBlock>(makeIde
|
|
|
131
154
|
*
|
|
132
155
|
* @stability unstable
|
|
133
156
|
* @category schemas
|
|
134
|
-
* @since
|
|
157
|
+
* @since 0.1.0
|
|
135
158
|
*/
|
|
136
159
|
export const ReasoningContentBlock = Schema.Struct({
|
|
137
160
|
reasoningText: Schema.optional(ReasoningTextBlock),
|
|
@@ -155,7 +178,7 @@ export const ReasoningContentBlock = Schema.Struct({
|
|
|
155
178
|
*
|
|
156
179
|
* @stability unstable
|
|
157
180
|
* @category schemas
|
|
158
|
-
* @since
|
|
181
|
+
* @since 0.1.0
|
|
159
182
|
*/
|
|
160
183
|
export class CachePointBlock extends Schema.Class<CachePointBlock>(makeIdentifier("CachePointBlock"))({
|
|
161
184
|
type: Schema.Literal("default"),
|
|
@@ -167,7 +190,7 @@ export class CachePointBlock extends Schema.Class<CachePointBlock>(makeIdentifie
|
|
|
167
190
|
*
|
|
168
191
|
* @stability unstable
|
|
169
192
|
* @category schemas
|
|
170
|
-
* @since
|
|
193
|
+
* @since 0.1.0
|
|
171
194
|
*/
|
|
172
195
|
export class S3Location extends Schema.Class<S3Location>(makeIdentifier("S3Location"))({
|
|
173
196
|
uri: Schema.String,
|
|
@@ -185,7 +208,7 @@ export class S3Location extends Schema.Class<S3Location>(makeIdentifier("S3Locat
|
|
|
185
208
|
*
|
|
186
209
|
* @stability unstable
|
|
187
210
|
* @category schemas
|
|
188
|
-
* @since
|
|
211
|
+
* @since 0.1.0
|
|
189
212
|
*/
|
|
190
213
|
export const MediaSource = Schema.Struct({
|
|
191
214
|
bytes: Schema.optional(Schema.String),
|
|
@@ -205,7 +228,7 @@ export const MediaSource = Schema.Struct({
|
|
|
205
228
|
*
|
|
206
229
|
* @stability unstable
|
|
207
230
|
* @category schemas
|
|
208
|
-
* @since
|
|
231
|
+
* @since 0.1.0
|
|
209
232
|
*/
|
|
210
233
|
export const DocumentSource = Schema.Struct({
|
|
211
234
|
...MediaSource.fields,
|
|
@@ -217,7 +240,7 @@ export const DocumentSource = Schema.Struct({
|
|
|
217
240
|
*
|
|
218
241
|
* @stability unstable
|
|
219
242
|
* @category schemas
|
|
220
|
-
* @since
|
|
243
|
+
* @since 0.1.0
|
|
221
244
|
*/
|
|
222
245
|
export class ImageBlock extends Schema.Class<ImageBlock>(makeIdentifier("ImageBlock"))({
|
|
223
246
|
format: Schema.Literals(["png", "jpeg", "gif", "webp"]),
|
|
@@ -234,7 +257,7 @@ export class ImageBlock extends Schema.Class<ImageBlock>(makeIdentifier("ImageBl
|
|
|
234
257
|
*
|
|
235
258
|
* @stability unstable
|
|
236
259
|
* @category schemas
|
|
237
|
-
* @since
|
|
260
|
+
* @since 0.1.0
|
|
238
261
|
*/
|
|
239
262
|
export class CitationsConfig extends Schema.Class<CitationsConfig>(makeIdentifier("CitationsConfig"))({
|
|
240
263
|
enabled: Schema.Boolean
|
|
@@ -255,7 +278,7 @@ export class CitationsConfig extends Schema.Class<CitationsConfig>(makeIdentifie
|
|
|
255
278
|
*
|
|
256
279
|
* @stability unstable
|
|
257
280
|
* @category schemas
|
|
258
|
-
* @since
|
|
281
|
+
* @since 0.1.0
|
|
259
282
|
*/
|
|
260
283
|
export class DocumentBlock extends Schema.Class<DocumentBlock>(makeIdentifier("DocumentBlock"))({
|
|
261
284
|
format: Schema.Literals(["pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"]),
|
|
@@ -277,7 +300,7 @@ export class DocumentBlock extends Schema.Class<DocumentBlock>(makeIdentifier("D
|
|
|
277
300
|
*
|
|
278
301
|
* @stability unstable
|
|
279
302
|
* @category schemas
|
|
280
|
-
* @since
|
|
303
|
+
* @since 0.1.0
|
|
281
304
|
*/
|
|
282
305
|
export class DocumentLocation extends Schema.Class<DocumentLocation>(makeIdentifier("DocumentLocation"))({
|
|
283
306
|
documentIndex: Schema.optional(Schema.Number),
|
|
@@ -296,7 +319,7 @@ export class DocumentLocation extends Schema.Class<DocumentLocation>(makeIdentif
|
|
|
296
319
|
*
|
|
297
320
|
* @stability unstable
|
|
298
321
|
* @category schemas
|
|
299
|
-
* @since
|
|
322
|
+
* @since 0.1.0
|
|
300
323
|
*/
|
|
301
324
|
export const CitationLocation = Schema.Struct({
|
|
302
325
|
documentChar: Schema.optional(DocumentLocation),
|
|
@@ -315,7 +338,7 @@ export const CitationLocation = Schema.Struct({
|
|
|
315
338
|
*
|
|
316
339
|
* @stability unstable
|
|
317
340
|
* @category schemas
|
|
318
|
-
* @since
|
|
341
|
+
* @since 0.1.0
|
|
319
342
|
*/
|
|
320
343
|
export const CitationTextContent = Schema.Struct({
|
|
321
344
|
text: Schema.optional(Schema.String)
|
|
@@ -326,7 +349,7 @@ export const CitationTextContent = Schema.Struct({
|
|
|
326
349
|
*
|
|
327
350
|
* @stability unstable
|
|
328
351
|
* @category schemas
|
|
329
|
-
* @since
|
|
352
|
+
* @since 0.1.0
|
|
330
353
|
*/
|
|
331
354
|
export class Citation extends Schema.Class<Citation>(makeIdentifier("Citation"))({
|
|
332
355
|
title: Schema.optional(Schema.String),
|
|
@@ -345,7 +368,7 @@ export class Citation extends Schema.Class<Citation>(makeIdentifier("Citation"))
|
|
|
345
368
|
*
|
|
346
369
|
* @stability unstable
|
|
347
370
|
* @category schemas
|
|
348
|
-
* @since
|
|
371
|
+
* @since 0.1.0
|
|
349
372
|
*/
|
|
350
373
|
export class CitationsContentBlock extends Schema.Class<CitationsContentBlock>(
|
|
351
374
|
makeIdentifier("CitationsContentBlock")
|
|
@@ -367,7 +390,7 @@ export class CitationsContentBlock extends Schema.Class<CitationsContentBlock>(
|
|
|
367
390
|
*
|
|
368
391
|
* @stability unstable
|
|
369
392
|
* @category schemas
|
|
370
|
-
* @since
|
|
393
|
+
* @since 0.1.0
|
|
371
394
|
*/
|
|
372
395
|
export const ContentBlock = Schema.Struct({
|
|
373
396
|
type: Schema.tagDefaultOmit("text"),
|
|
@@ -386,7 +409,7 @@ export const ContentBlock = Schema.Struct({
|
|
|
386
409
|
*
|
|
387
410
|
* @stability unstable
|
|
388
411
|
* @category schemas
|
|
389
|
-
* @since
|
|
412
|
+
* @since 0.1.0
|
|
390
413
|
*/
|
|
391
414
|
export class Message extends Schema.Class<Message>(makeIdentifier("Message"))({
|
|
392
415
|
role: Schema.Literals(["user", "assistant"]),
|
|
@@ -403,7 +426,7 @@ export class Message extends Schema.Class<Message>(makeIdentifier("Message"))({
|
|
|
403
426
|
*
|
|
404
427
|
* @stability unstable
|
|
405
428
|
* @category schemas
|
|
406
|
-
* @since
|
|
429
|
+
* @since 0.1.0
|
|
407
430
|
*/
|
|
408
431
|
export const SystemContentBlock = Schema.Struct({
|
|
409
432
|
text: Schema.optional(Schema.String),
|
|
@@ -415,7 +438,7 @@ export const SystemContentBlock = Schema.Struct({
|
|
|
415
438
|
*
|
|
416
439
|
* @stability unstable
|
|
417
440
|
* @category schemas
|
|
418
|
-
* @since
|
|
441
|
+
* @since 0.1.0
|
|
419
442
|
*/
|
|
420
443
|
export class InferenceConfiguration extends Schema.Class<InferenceConfiguration>(
|
|
421
444
|
makeIdentifier("InferenceConfiguration")
|
|
@@ -431,7 +454,7 @@ export class InferenceConfiguration extends Schema.Class<InferenceConfiguration>
|
|
|
431
454
|
*
|
|
432
455
|
* @stability unstable
|
|
433
456
|
* @category schemas
|
|
434
|
-
* @since
|
|
457
|
+
* @since 0.1.0
|
|
435
458
|
*/
|
|
436
459
|
export class ToolSpecification extends Schema.Class<ToolSpecification>(makeIdentifier("ToolSpecification"))({
|
|
437
460
|
name: Schema.String,
|
|
@@ -456,7 +479,7 @@ export class ToolSpecification extends Schema.Class<ToolSpecification>(makeIdent
|
|
|
456
479
|
*
|
|
457
480
|
* @stability unstable
|
|
458
481
|
* @category schemas
|
|
459
|
-
* @since
|
|
482
|
+
* @since 0.1.0
|
|
460
483
|
*/
|
|
461
484
|
export class Tool extends Schema.Class<Tool>(makeIdentifier("Tool"))({
|
|
462
485
|
toolSpec: Schema.optional(ToolSpecification),
|
|
@@ -469,7 +492,7 @@ export class Tool extends Schema.Class<Tool>(makeIdentifier("Tool"))({
|
|
|
469
492
|
*
|
|
470
493
|
* @stability unstable
|
|
471
494
|
* @category schemas
|
|
472
|
-
* @since
|
|
495
|
+
* @since 0.1.0
|
|
473
496
|
*/
|
|
474
497
|
export const ToolChoice = Schema.Union([
|
|
475
498
|
Schema.Struct({ auto: Schema.Struct({}) }),
|
|
@@ -482,7 +505,7 @@ export const ToolChoice = Schema.Union([
|
|
|
482
505
|
*
|
|
483
506
|
* @stability unstable
|
|
484
507
|
* @category schemas
|
|
485
|
-
* @since
|
|
508
|
+
* @since 0.1.0
|
|
486
509
|
*/
|
|
487
510
|
export type ToolChoice = typeof ToolChoice.Type
|
|
488
511
|
|
|
@@ -491,7 +514,7 @@ export type ToolChoice = typeof ToolChoice.Type
|
|
|
491
514
|
*
|
|
492
515
|
* @stability unstable
|
|
493
516
|
* @category schemas
|
|
494
|
-
* @since
|
|
517
|
+
* @since 0.1.0
|
|
495
518
|
*/
|
|
496
519
|
export class ToolConfiguration extends Schema.Class<ToolConfiguration>(makeIdentifier("ToolConfiguration"))({
|
|
497
520
|
tools: Schema.Array(Tool),
|
|
@@ -508,7 +531,7 @@ export class ToolConfiguration extends Schema.Class<ToolConfiguration>(makeIdent
|
|
|
508
531
|
*
|
|
509
532
|
* @stability unstable
|
|
510
533
|
* @category schemas
|
|
511
|
-
* @since
|
|
534
|
+
* @since 0.1.0
|
|
512
535
|
*/
|
|
513
536
|
export const JsonSchemaDefinition = Schema.Struct({
|
|
514
537
|
schema: Schema.String,
|
|
@@ -522,7 +545,7 @@ export const JsonSchemaDefinition = Schema.Struct({
|
|
|
522
545
|
*
|
|
523
546
|
* @stability unstable
|
|
524
547
|
* @category schemas
|
|
525
|
-
* @since
|
|
548
|
+
* @since 0.1.0
|
|
526
549
|
*/
|
|
527
550
|
export const OutputFormatStructure = Schema.Struct({
|
|
528
551
|
jsonSchema: JsonSchemaDefinition
|
|
@@ -533,7 +556,7 @@ export const OutputFormatStructure = Schema.Struct({
|
|
|
533
556
|
*
|
|
534
557
|
* @stability unstable
|
|
535
558
|
* @category schemas
|
|
536
|
-
* @since
|
|
559
|
+
* @since 0.1.0
|
|
537
560
|
*/
|
|
538
561
|
export const OutputFormat = Schema.Struct({
|
|
539
562
|
type: Schema.Literal("json_schema"),
|
|
@@ -547,7 +570,7 @@ export const OutputFormat = Schema.Struct({
|
|
|
547
570
|
*
|
|
548
571
|
* @stability unstable
|
|
549
572
|
* @category schemas
|
|
550
|
-
* @since
|
|
573
|
+
* @since 0.1.0
|
|
551
574
|
*/
|
|
552
575
|
export const OutputConfig = Schema.Struct({
|
|
553
576
|
textFormat: Schema.optionalKey(OutputFormat),
|
|
@@ -570,7 +593,7 @@ export const OutputConfig = Schema.Struct({
|
|
|
570
593
|
*
|
|
571
594
|
* @stability unstable
|
|
572
595
|
* @category schemas
|
|
573
|
-
* @since
|
|
596
|
+
* @since 0.1.0
|
|
574
597
|
*/
|
|
575
598
|
export class ConverseRequest extends Schema.Class<ConverseRequest>(makeIdentifier("ConverseRequest"))({
|
|
576
599
|
modelId: Schema.String,
|
|
@@ -591,7 +614,7 @@ export class ConverseRequest extends Schema.Class<ConverseRequest>(makeIdentifie
|
|
|
591
614
|
*
|
|
592
615
|
* @stability unstable
|
|
593
616
|
* @category schemas
|
|
594
|
-
* @since
|
|
617
|
+
* @since 0.1.0
|
|
595
618
|
*/
|
|
596
619
|
export class ConverseOutput extends Schema.Class<ConverseOutput>(makeIdentifier("ConverseOutput"))({
|
|
597
620
|
message: Message
|
|
@@ -602,7 +625,7 @@ export class ConverseOutput extends Schema.Class<ConverseOutput>(makeIdentifier(
|
|
|
602
625
|
*
|
|
603
626
|
* @stability unstable
|
|
604
627
|
* @category schemas
|
|
605
|
-
* @since
|
|
628
|
+
* @since 0.1.0
|
|
606
629
|
*/
|
|
607
630
|
export class ConverseMetrics extends Schema.Class<ConverseMetrics>(makeIdentifier("ConverseMetrics"))({
|
|
608
631
|
latencyMs: Schema.Number
|
|
@@ -613,7 +636,7 @@ export class ConverseMetrics extends Schema.Class<ConverseMetrics>(makeIdentifie
|
|
|
613
636
|
*
|
|
614
637
|
* @stability unstable
|
|
615
638
|
* @category schemas
|
|
616
|
-
* @since
|
|
639
|
+
* @since 0.1.0
|
|
617
640
|
*/
|
|
618
641
|
export class ConverseResponse extends Schema.Class<ConverseResponse>(makeIdentifier("ConverseResponse"))({
|
|
619
642
|
output: ConverseOutput,
|
|
@@ -631,7 +654,7 @@ export class ConverseResponse extends Schema.Class<ConverseResponse>(makeIdentif
|
|
|
631
654
|
*
|
|
632
655
|
* @stability unstable
|
|
633
656
|
* @category schemas
|
|
634
|
-
* @since
|
|
657
|
+
* @since 0.1.0
|
|
635
658
|
*/
|
|
636
659
|
export class MessageStartEvent extends Schema.Class<MessageStartEvent>(
|
|
637
660
|
makeIdentifier("MessageStartEvent")
|
|
@@ -646,7 +669,7 @@ export class MessageStartEvent extends Schema.Class<MessageStartEvent>(
|
|
|
646
669
|
*
|
|
647
670
|
* @stability unstable
|
|
648
671
|
* @category schemas
|
|
649
|
-
* @since
|
|
672
|
+
* @since 0.1.0
|
|
650
673
|
*/
|
|
651
674
|
export const ToolUseBlockDelta = Schema.Struct({
|
|
652
675
|
input: Schema.String
|
|
@@ -663,7 +686,7 @@ export const ToolUseBlockDelta = Schema.Struct({
|
|
|
663
686
|
*
|
|
664
687
|
* @stability unstable
|
|
665
688
|
* @category schemas
|
|
666
|
-
* @since
|
|
689
|
+
* @since 0.1.0
|
|
667
690
|
*/
|
|
668
691
|
export const ReasoningContentBlockDelta = Schema.Struct({
|
|
669
692
|
text: Schema.optional(Schema.String),
|
|
@@ -681,7 +704,7 @@ export const ReasoningContentBlockDelta = Schema.Struct({
|
|
|
681
704
|
*
|
|
682
705
|
* @stability unstable
|
|
683
706
|
* @category schemas
|
|
684
|
-
* @since
|
|
707
|
+
* @since 0.1.0
|
|
685
708
|
*/
|
|
686
709
|
export class CitationsDelta extends Schema.Class<CitationsDelta>(makeIdentifier("CitationsDelta"))({
|
|
687
710
|
title: Schema.optional(Schema.String),
|
|
@@ -703,7 +726,7 @@ export class CitationsDelta extends Schema.Class<CitationsDelta>(makeIdentifier(
|
|
|
703
726
|
*
|
|
704
727
|
* @stability unstable
|
|
705
728
|
* @category schemas
|
|
706
|
-
* @since
|
|
729
|
+
* @since 0.1.0
|
|
707
730
|
*/
|
|
708
731
|
export const ContentBlockDelta = Schema.Struct({
|
|
709
732
|
text: Schema.optional(Schema.String),
|
|
@@ -717,7 +740,7 @@ export const ContentBlockDelta = Schema.Struct({
|
|
|
717
740
|
*
|
|
718
741
|
* @stability unstable
|
|
719
742
|
* @category schemas
|
|
720
|
-
* @since
|
|
743
|
+
* @since 0.1.0
|
|
721
744
|
*/
|
|
722
745
|
export class ContentBlockDeltaEvent extends Schema.Class<ContentBlockDeltaEvent>(
|
|
723
746
|
makeIdentifier("ContentBlockDeltaEvent")
|
|
@@ -731,7 +754,7 @@ export class ContentBlockDeltaEvent extends Schema.Class<ContentBlockDeltaEvent>
|
|
|
731
754
|
*
|
|
732
755
|
* @stability unstable
|
|
733
756
|
* @category schemas
|
|
734
|
-
* @since
|
|
757
|
+
* @since 0.1.0
|
|
735
758
|
*/
|
|
736
759
|
export class ContentBlockStopEvent extends Schema.Class<ContentBlockStopEvent>(
|
|
737
760
|
makeIdentifier("ContentBlockStopEvent")
|
|
@@ -745,7 +768,7 @@ export class ContentBlockStopEvent extends Schema.Class<ContentBlockStopEvent>(
|
|
|
745
768
|
*
|
|
746
769
|
* @stability unstable
|
|
747
770
|
* @category schemas
|
|
748
|
-
* @since
|
|
771
|
+
* @since 0.1.0
|
|
749
772
|
*/
|
|
750
773
|
export const ToolUseBlockStart = Schema.Struct({
|
|
751
774
|
toolUseId: Schema.String,
|
|
@@ -763,7 +786,7 @@ export const ToolUseBlockStart = Schema.Struct({
|
|
|
763
786
|
*
|
|
764
787
|
* @stability unstable
|
|
765
788
|
* @category schemas
|
|
766
|
-
* @since
|
|
789
|
+
* @since 0.1.0
|
|
767
790
|
*/
|
|
768
791
|
export const ContentBlockStart = Schema.Struct({
|
|
769
792
|
toolUse: Schema.optional(ToolUseBlockStart)
|
|
@@ -777,7 +800,7 @@ export const ContentBlockStart = Schema.Struct({
|
|
|
777
800
|
*
|
|
778
801
|
* @stability unstable
|
|
779
802
|
* @category schemas
|
|
780
|
-
* @since
|
|
803
|
+
* @since 0.1.0
|
|
781
804
|
*/
|
|
782
805
|
export class ContentBlockStartEvent extends Schema.Class<ContentBlockStartEvent>(
|
|
783
806
|
makeIdentifier("ContentBlockStartEvent")
|
|
@@ -791,7 +814,7 @@ export class ContentBlockStartEvent extends Schema.Class<ContentBlockStartEvent>
|
|
|
791
814
|
*
|
|
792
815
|
* @stability unstable
|
|
793
816
|
* @category schemas
|
|
794
|
-
* @since
|
|
817
|
+
* @since 0.1.0
|
|
795
818
|
*/
|
|
796
819
|
export class MessageStopEvent extends Schema.Class<MessageStopEvent>(
|
|
797
820
|
makeIdentifier("MessageStopEvent")
|
|
@@ -804,7 +827,7 @@ export class MessageStopEvent extends Schema.Class<MessageStopEvent>(
|
|
|
804
827
|
*
|
|
805
828
|
* @stability unstable
|
|
806
829
|
* @category schemas
|
|
807
|
-
* @since
|
|
830
|
+
* @since 0.1.0
|
|
808
831
|
*/
|
|
809
832
|
export class ConverseStreamMetadataEvent extends Schema.Class<ConverseStreamMetadataEvent>(
|
|
810
833
|
makeIdentifier("ConverseStreamMetadataEvent")
|
|
@@ -828,7 +851,7 @@ const ExceptionBody = Schema.Struct({
|
|
|
828
851
|
*
|
|
829
852
|
* @stability unstable
|
|
830
853
|
* @category schemas
|
|
831
|
-
* @since
|
|
854
|
+
* @since 0.1.0
|
|
832
855
|
*/
|
|
833
856
|
export const ConverseResponseStreamEvent = Schema.Union([
|
|
834
857
|
Schema.Struct({
|
|
@@ -882,6 +905,6 @@ export const ConverseResponseStreamEvent = Schema.Union([
|
|
|
882
905
|
*
|
|
883
906
|
* @stability unstable
|
|
884
907
|
* @category schemas
|
|
885
|
-
* @since
|
|
908
|
+
* @since 0.1.0
|
|
886
909
|
*/
|
|
887
910
|
export type ConverseResponseStreamEvent = typeof ConverseResponseStreamEvent.Type
|
package/src/index.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @stability unstable
|
|
3
|
-
* @since
|
|
3
|
+
* @since 0.1.0
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// @barrel: Auto-generated exports. Do not edit manually.
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @stability unstable
|
|
10
|
-
* @since
|
|
10
|
+
* @since 0.1.0
|
|
11
11
|
*/
|
|
12
12
|
export * as AmazonBedrockClient from "./AmazonBedrockClient.ts"
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @stability unstable
|
|
16
|
-
* @since
|
|
16
|
+
* @since 0.1.0
|
|
17
17
|
*/
|
|
18
18
|
export * as AmazonBedrockConfig from "./AmazonBedrockConfig.ts"
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* @stability unstable
|
|
22
|
-
* @since
|
|
22
|
+
* @since 0.1.0
|
|
23
23
|
*/
|
|
24
24
|
export * as AmazonBedrockEventStream from "./AmazonBedrockEventStream.ts"
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* @stability unstable
|
|
28
|
-
* @since
|
|
28
|
+
* @since 0.1.0
|
|
29
29
|
*/
|
|
30
30
|
export * as AmazonBedrockLanguageModel from "./AmazonBedrockLanguageModel.ts"
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* @stability unstable
|
|
34
|
-
* @since
|
|
34
|
+
* @since 0.1.0
|
|
35
35
|
*/
|
|
36
36
|
export * as AmazonBedrockSchema from "./AmazonBedrockSchema.ts"
|