@anthropic-ai/sdk 0.10.2 → 0.12.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.
Files changed (73) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +51 -86
  3. package/error.d.ts.map +1 -1
  4. package/error.js +2 -1
  5. package/error.js.map +1 -1
  6. package/error.mjs +2 -1
  7. package/error.mjs.map +1 -1
  8. package/index.d.mts +9 -5
  9. package/index.d.ts +9 -5
  10. package/index.d.ts.map +1 -1
  11. package/index.js +7 -5
  12. package/index.js.map +1 -1
  13. package/index.mjs +7 -5
  14. package/index.mjs.map +1 -1
  15. package/lib/MessageStream.d.ts +94 -0
  16. package/lib/MessageStream.d.ts.map +1 -0
  17. package/lib/MessageStream.js +421 -0
  18. package/lib/MessageStream.js.map +1 -0
  19. package/lib/MessageStream.mjs +417 -0
  20. package/lib/MessageStream.mjs.map +1 -0
  21. package/package.json +3 -2
  22. package/resources/beta/beta.d.ts +25 -0
  23. package/resources/beta/beta.d.ts.map +1 -0
  24. package/resources/beta/beta.js +40 -0
  25. package/resources/beta/beta.js.map +1 -0
  26. package/resources/beta/beta.mjs +13 -0
  27. package/resources/beta/beta.mjs.map +1 -0
  28. package/resources/beta/index.d.ts +3 -0
  29. package/resources/beta/index.d.ts.map +1 -0
  30. package/resources/beta/index.js +9 -0
  31. package/resources/beta/index.js.map +1 -0
  32. package/resources/beta/index.mjs +4 -0
  33. package/resources/beta/index.mjs.map +1 -0
  34. package/resources/beta/messages.d.ts +495 -0
  35. package/resources/beta/messages.d.ts.map +1 -0
  36. package/resources/beta/messages.js +29 -0
  37. package/resources/beta/messages.js.map +1 -0
  38. package/resources/beta/messages.mjs +24 -0
  39. package/resources/beta/messages.mjs.map +1 -0
  40. package/resources/completions.d.ts +35 -27
  41. package/resources/completions.d.ts.map +1 -1
  42. package/resources/completions.js.map +1 -1
  43. package/resources/completions.mjs.map +1 -1
  44. package/resources/index.d.ts +1 -0
  45. package/resources/index.d.ts.map +1 -1
  46. package/resources/index.js +3 -1
  47. package/resources/index.js.map +1 -1
  48. package/resources/index.mjs +1 -0
  49. package/resources/index.mjs.map +1 -1
  50. package/src/error.ts +2 -1
  51. package/src/index.ts +11 -5
  52. package/src/lib/MessageStream.ts +515 -0
  53. package/src/resources/beta/beta.ts +28 -0
  54. package/src/resources/beta/index.ts +22 -0
  55. package/src/resources/beta/messages.ts +581 -0
  56. package/src/resources/completions.ts +37 -27
  57. package/src/resources/index.ts +1 -0
  58. package/src/streaming.ts +21 -1
  59. package/src/uploads.ts +2 -3
  60. package/src/version.ts +1 -1
  61. package/streaming.d.ts.map +1 -1
  62. package/streaming.js +15 -0
  63. package/streaming.js.map +1 -1
  64. package/streaming.mjs +15 -0
  65. package/streaming.mjs.map +1 -1
  66. package/uploads.d.ts.map +1 -1
  67. package/uploads.js +2 -1
  68. package/uploads.js.map +1 -1
  69. package/uploads.mjs +2 -1
  70. package/uploads.mjs.map +1 -1
  71. package/version.d.ts +1 -1
  72. package/version.js +1 -1
  73. package/version.mjs +1 -1
@@ -0,0 +1,581 @@
1
+ // File generated from our OpenAPI spec by Stainless.
2
+
3
+ import * as Core from "../../core";
4
+ import { APIPromise } from "../../core";
5
+ import { APIResource } from "../../resource";
6
+ import { MessageStream } from "../../lib/MessageStream";
7
+ export { MessageStream } from "../../lib/MessageStream";
8
+ import * as MessagesAPI from "./messages";
9
+ import { Stream } from "../../streaming";
10
+
11
+ export class Messages extends APIResource {
12
+ /**
13
+ * Create a Message.
14
+ *
15
+ * The Messages API is currently in beta.
16
+ */
17
+ create(body: MessageCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Message>;
18
+ create(
19
+ body: MessageCreateParamsStreaming,
20
+ options?: Core.RequestOptions,
21
+ ): APIPromise<Stream<MessageStreamEvent>>;
22
+ create(
23
+ body: MessageCreateParamsBase,
24
+ options?: Core.RequestOptions,
25
+ ): APIPromise<Stream<MessageStreamEvent> | Message>;
26
+ create(
27
+ body: MessageCreateParams,
28
+ options?: Core.RequestOptions,
29
+ ): APIPromise<Message> | APIPromise<Stream<MessageStreamEvent>> {
30
+ return this._client.post('/v1/messages', {
31
+ body,
32
+ timeout: 600000,
33
+ ...options,
34
+ headers: { 'Anthropic-Beta': 'messages-2023-12-15', ...options?.headers },
35
+ stream: body.stream ?? false,
36
+ }) as APIPromise<Message> | APIPromise<Stream<MessageStreamEvent>>;
37
+ }
38
+
39
+ /**
40
+ * Create a Message stream
41
+ */
42
+ stream(body: MessageStreamParams, options?: Core.RequestOptions): MessageStream {
43
+ return MessageStream.createMessage(this._client.beta.messages, body, options);
44
+ }
45
+ }
46
+
47
+ export interface ContentBlock {
48
+ text: string;
49
+
50
+ type: 'text';
51
+ }
52
+
53
+ export interface ContentBlockDeltaEvent {
54
+ delta: TextDelta;
55
+
56
+ index: number;
57
+
58
+ type: 'content_block_delta';
59
+ }
60
+
61
+ export interface ContentBlockStartEvent {
62
+ content_block: ContentBlock;
63
+
64
+ index: number;
65
+
66
+ type: 'content_block_start';
67
+ }
68
+
69
+ export interface ContentBlockStopEvent {
70
+ index: number;
71
+
72
+ type: 'content_block_stop';
73
+ }
74
+
75
+ export interface Message {
76
+ /**
77
+ * Unique object identifier.
78
+ *
79
+ * The format and length of IDs may change over time.
80
+ */
81
+ id: string;
82
+
83
+ /**
84
+ * Content generated by the model.
85
+ *
86
+ * This is an array of content blocks, each of which has a `type` that determines
87
+ * its shape. Currently, the only `type` available is `"text"`.
88
+ *
89
+ * Example:
90
+ *
91
+ * ```json
92
+ * [{ "type": "text", "text": "Hi, I'm Claude." }]
93
+ * ```
94
+ *
95
+ * If the request input `messages` ended with an `assistant` turn, then the
96
+ * response `content` will continue directly from that last turn. You can use this
97
+ * to constrain the model's output.
98
+ *
99
+ * For example, if the input `messages` were:
100
+ *
101
+ * ```json
102
+ * [
103
+ * {
104
+ * "role": "user",
105
+ * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
106
+ * },
107
+ * {
108
+ * "role": "assistant",
109
+ * "content": "The best answer is ("
110
+ * }
111
+ * ]
112
+ * ```
113
+ *
114
+ * Then the response `content` might be:
115
+ *
116
+ * ```json
117
+ * [{ "type": "text", "text": "B)" }]
118
+ * ```
119
+ */
120
+ content: Array<ContentBlock>;
121
+
122
+ /**
123
+ * The model that handled the request.
124
+ */
125
+ model: string;
126
+
127
+ /**
128
+ * Conversational role of the generated message.
129
+ *
130
+ * This will always be `"assistant"`.
131
+ */
132
+ role: 'assistant';
133
+
134
+ /**
135
+ * The reason that we stopped.
136
+ *
137
+ * This may be one the following values:
138
+ *
139
+ * - `"end_turn"`: the model reached a natural stopping point
140
+ * - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
141
+ * - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
142
+ *
143
+ * Note that these values are different than those in `/v1/complete`, where
144
+ * `end_turn` and `stop_sequence` were not differentiated.
145
+ *
146
+ * In non-streaming mode this value is always non-null. In streaming mode, it is
147
+ * null in the `message_start` event and non-null otherwise.
148
+ */
149
+ stop_reason: 'end_turn' | 'max_tokens' | 'stop_sequence' | null;
150
+
151
+ /**
152
+ * Which custom stop sequence was generated.
153
+ *
154
+ * This value will be non-null if one of your custom stop sequences was generated.
155
+ */
156
+ stop_sequence: string | null;
157
+
158
+ type: 'message';
159
+ }
160
+
161
+ export interface MessageDeltaEvent {
162
+ delta: MessageDeltaEvent.Delta;
163
+
164
+ type: 'message_delta';
165
+ }
166
+
167
+ export namespace MessageDeltaEvent {
168
+ export interface Delta {
169
+ stop_reason: 'end_turn' | 'max_tokens' | 'stop_sequence' | null;
170
+
171
+ stop_sequence: string | null;
172
+ }
173
+ }
174
+
175
+ export interface MessageParam {
176
+ content: string | Array<TextBlock>;
177
+
178
+ role: 'user' | 'assistant';
179
+ }
180
+
181
+ export interface MessageStartEvent {
182
+ message: Message;
183
+
184
+ type: 'message_start';
185
+ }
186
+
187
+ export interface MessageStopEvent {
188
+ type: 'message_stop';
189
+ }
190
+
191
+ export type MessageStreamEvent =
192
+ | MessageStartEvent
193
+ | MessageDeltaEvent
194
+ | MessageStopEvent
195
+ | ContentBlockStartEvent
196
+ | ContentBlockDeltaEvent
197
+ | ContentBlockStopEvent;
198
+
199
+ export interface TextBlock {
200
+ text: string;
201
+
202
+ type?: 'text';
203
+ }
204
+
205
+ export interface TextDelta {
206
+ text: string;
207
+
208
+ type: 'text_delta';
209
+ }
210
+
211
+ export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming;
212
+
213
+ export interface MessageCreateParamsBase {
214
+ /**
215
+ * The maximum number of tokens to generate before stopping.
216
+ *
217
+ * Note that our models may stop _before_ reaching this maximum. This parameter
218
+ * only specifies the absolute maximum number of tokens to generate.
219
+ *
220
+ * Different models have different maximum values for this parameter. See
221
+ * [input and output sizes](https://docs.anthropic.com/claude/reference/input-and-output-sizes)
222
+ * for details.
223
+ */
224
+ max_tokens: number;
225
+
226
+ /**
227
+ * Input messages.
228
+ *
229
+ * Our models are trained to operate on alternating `user` and `assistant`
230
+ * conversational turns. When creating a new `Message`, you specify the prior
231
+ * conversational turns with the `messages` parameter, and the model then generates
232
+ * the next `Message` in the conversation.
233
+ *
234
+ * Each input message must be an object with a `role` and `content`. You can
235
+ * specify a single `user`-role message, or you can include multiple `user` and
236
+ * `assistant` messages. The first message must always use the `user` role.
237
+ *
238
+ * If the final message uses the `assistant` role, the response content will
239
+ * continue immediately from the content in that message. This can be used to
240
+ * constrain part of the model's response.
241
+ *
242
+ * Example with a single `user` message:
243
+ *
244
+ * ```json
245
+ * [{ "role": "user", "content": "Hello, Claude" }]
246
+ * ```
247
+ *
248
+ * Example with multiple conversational turns:
249
+ *
250
+ * ```json
251
+ * [
252
+ * { "role": "user", "content": "Hello there." },
253
+ * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
254
+ * { "role": "user", "content": "Can you explain LLMs in plain English?" }
255
+ * ]
256
+ * ```
257
+ *
258
+ * Example with a partially-filled response from Claude:
259
+ *
260
+ * ```json
261
+ * [
262
+ * { "role": "user", "content": "Please describe yourself using only JSON" },
263
+ * { "role": "assistant", "content": "Here is my JSON description:\n{" }
264
+ * ]
265
+ * ```
266
+ *
267
+ * Each input message `content` may be either a single `string` or an array of
268
+ * content blocks, where each block has a specific `type`. Using a `string` is
269
+ * shorthand for an array of one content block of type `"text"`. The following
270
+ * input messages are equivalent:
271
+ *
272
+ * ```json
273
+ * { "role": "user", "content": "Hello, Claude" }
274
+ * ```
275
+ *
276
+ * ```json
277
+ * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
278
+ * ```
279
+ *
280
+ * During beta, the Messages API only accepts content blocks of type `"text"`, and
281
+ * at most one block per message.
282
+ *
283
+ * See our
284
+ * [guide to prompt design](https://docs.anthropic.com/claude/docs/introduction-to-prompt-design)
285
+ * for more details on how to best construct prompts.
286
+ */
287
+ messages: Array<MessageParam>;
288
+
289
+ /**
290
+ * The model that will complete your prompt.
291
+ *
292
+ * As we improve Claude, we develop new versions of it that you can query. The
293
+ * `model` parameter controls which version of Claude responds to your request.
294
+ * Right now we offer two model families: Claude, and Claude Instant. You can use
295
+ * them by setting `model` to `"claude-2.1"` or `"claude-instant-1.2"`,
296
+ * respectively.
297
+ *
298
+ * See [models](https://docs.anthropic.com/claude/reference/selecting-a-model) for
299
+ * additional details and options.
300
+ */
301
+ model: string;
302
+
303
+ /**
304
+ * An object describing metadata about the request.
305
+ */
306
+ metadata?: MessageCreateParams.Metadata;
307
+
308
+ /**
309
+ * Custom text sequences that will cause the model to stop generating.
310
+ *
311
+ * Our models will normally stop when they have naturally completed their turn,
312
+ * which will result in a response `stop_reason` of `"end_turn"`.
313
+ *
314
+ * If you want the model to stop generating when it encounters custom strings of
315
+ * text, you can use the `stop_sequences` parameter. If the model encounters one of
316
+ * the custom sequences, the response `stop_reason` value will be `"stop_sequence"`
317
+ * and the response `stop_sequence` value will contain the matched stop sequence.
318
+ */
319
+ stop_sequences?: Array<string>;
320
+
321
+ /**
322
+ * Whether to incrementally stream the response using server-sent events.
323
+ *
324
+ * See [streaming](https://docs.anthropic.com/claude/reference/streaming) for
325
+ * details.
326
+ */
327
+ stream?: boolean;
328
+
329
+ /**
330
+ * System prompt.
331
+ *
332
+ * A system prompt is a way of providing context and instructions to Claude, such
333
+ * as specifying a particular goal or role. See our
334
+ * [guide to system prompts](https://docs.anthropic.com/claude/docs/how-to-use-system-prompts).
335
+ */
336
+ system?: string;
337
+
338
+ /**
339
+ * Amount of randomness injected into the response.
340
+ *
341
+ * Defaults to 1. Ranges from 0 to 1. Use temp closer to 0 for analytical /
342
+ * multiple choice, and closer to 1 for creative and generative tasks.
343
+ */
344
+ temperature?: number;
345
+
346
+ /**
347
+ * Only sample from the top K options for each subsequent token.
348
+ *
349
+ * Used to remove "long tail" low probability responses.
350
+ * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
351
+ */
352
+ top_k?: number;
353
+
354
+ /**
355
+ * Use nucleus sampling.
356
+ *
357
+ * In nucleus sampling, we compute the cumulative distribution over all the options
358
+ * for each subsequent token in decreasing probability order and cut it off once it
359
+ * reaches a particular probability specified by `top_p`. You should either alter
360
+ * `temperature` or `top_p`, but not both.
361
+ */
362
+ top_p?: number;
363
+ }
364
+
365
+ export namespace MessageCreateParams {
366
+ /**
367
+ * An object describing metadata about the request.
368
+ */
369
+ export interface Metadata {
370
+ /**
371
+ * An external identifier for the user who is associated with the request.
372
+ *
373
+ * This should be a uuid, hash value, or other opaque identifier. Anthropic may use
374
+ * this id to help detect abuse. Do not include any identifying information such as
375
+ * name, email address, or phone number.
376
+ */
377
+ user_id?: string;
378
+ }
379
+
380
+ export type MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming;
381
+ export type MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming;
382
+ }
383
+
384
+ export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase {
385
+ /**
386
+ * Whether to incrementally stream the response using server-sent events.
387
+ *
388
+ * See [streaming](https://docs.anthropic.com/claude/reference/streaming) for
389
+ * details.
390
+ */
391
+ stream?: false;
392
+ }
393
+
394
+ export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
395
+ /**
396
+ * Whether to incrementally stream the response using server-sent events.
397
+ *
398
+ * See [streaming](https://docs.anthropic.com/claude/reference/streaming) for
399
+ * details.
400
+ */
401
+ stream: true;
402
+ }
403
+
404
+ export interface MessageStreamParams {
405
+ /**
406
+ * The maximum number of tokens to generate before stopping.
407
+ *
408
+ * Note that our models may stop _before_ reaching this maximum. This parameter
409
+ * only specifies the absolute maximum number of tokens to generate.
410
+ *
411
+ * Different models have different maximum values for this parameter. See
412
+ * [input and output sizes](https://docs.anthropic.com/claude/reference/input-and-output-sizes)
413
+ * for details.
414
+ */
415
+ max_tokens: number;
416
+
417
+ /**
418
+ * Input messages.
419
+ *
420
+ * Our models are trained to operate on alternating `user` and `assistant`
421
+ * conversational turns. When creating a new `Message`, you specify the prior
422
+ * conversational turns with the `messages` parameter, and the model then generates
423
+ * the next `Message` in the conversation.
424
+ *
425
+ * Each input message must be an object with a `role` and `content`. You can
426
+ * specify a single `user`-role message, or you can include multiple `user` and
427
+ * `assistant` messages. The first message must always use the `user` role.
428
+ *
429
+ * If the final message uses the `assistant` role, the response content will
430
+ * continue immediately from the content in that message. This can be used to
431
+ * constrain part of the model's response.
432
+ *
433
+ * Example with a single `user` message:
434
+ *
435
+ * ```json
436
+ * [{ "role": "user", "content": "Hello, Claude" }]
437
+ * ```
438
+ *
439
+ * Example with multiple conversational turns:
440
+ *
441
+ * ```json
442
+ * [
443
+ * { "role": "user", "content": "Hello there." },
444
+ * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
445
+ * { "role": "user", "content": "Can you explain LLMs in plain English?" }
446
+ * ]
447
+ * ```
448
+ *
449
+ * Example with a partially-filled response from Claude:
450
+ *
451
+ * ```json
452
+ * [
453
+ * { "role": "user", "content": "Please describe yourself using only JSON" },
454
+ * { "role": "assistant", "content": "Here is my JSON description:\n{" }
455
+ * ]
456
+ * ```
457
+ *
458
+ * Each input message `content` may be either a single `string` or an array of
459
+ * content blocks, where each block has a specific `type`. Using a `string` is
460
+ * shorthand for an array of one content block of type `"text"`. The following
461
+ * input messages are equivalent:
462
+ *
463
+ * ```json
464
+ * { "role": "user", "content": "Hello, Claude" }
465
+ * ```
466
+ *
467
+ * ```json
468
+ * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
469
+ * ```
470
+ *
471
+ * During beta, the Messages API only accepts content blocks of type `"text"`, and
472
+ * at most one block per message.
473
+ *
474
+ * See our
475
+ * [guide to prompt design](https://docs.anthropic.com/claude/docs/introduction-to-prompt-design)
476
+ * for more details on how to best construct prompts.
477
+ */
478
+ messages: Array<MessageParam>;
479
+
480
+ /**
481
+ * The model that will complete your prompt.
482
+ *
483
+ * As we improve Claude, we develop new versions of it that you can query. The
484
+ * `model` parameter controls which version of Claude responds to your request.
485
+ * Right now we offer two model families: Claude, and Claude Instant. You can use
486
+ * them by setting `model` to `"claude-2.1"` or `"claude-instant-1.2"`,
487
+ * respectively.
488
+ *
489
+ * See [models](https://docs.anthropic.com/claude/reference/selecting-a-model) for
490
+ * additional details and options.
491
+ */
492
+ model: string;
493
+
494
+ /**
495
+ * An object describing metadata about the request.
496
+ */
497
+ metadata?: MessageStreamParams.Metadata;
498
+
499
+ /**
500
+ * Custom text sequences that will cause the model to stop generating.
501
+ *
502
+ * Our models will normally stop when they have naturally completed their turn,
503
+ * which will result in a response `stop_reason` of `"end_turn"`.
504
+ *
505
+ * If you want the model to stop generating when it encounters custom strings of
506
+ * text, you can use the `stop_sequences` parameter. If the model encounters one of
507
+ * the custom sequences, the response `stop_reason` value will be `"stop_sequence"`
508
+ * and the response `stop_sequence` value will contain the matched stop sequence.
509
+ */
510
+ stop_sequences?: Array<string>;
511
+
512
+ /**
513
+ * System prompt.
514
+ *
515
+ * A system prompt is a way of providing context and instructions to Claude, such
516
+ * as specifying a particular goal or role. See our
517
+ * [guide to system prompts](https://docs.anthropic.com/claude/docs/how-to-use-system-prompts).
518
+ */
519
+ system?: string;
520
+
521
+ /**
522
+ * Amount of randomness injected into the response.
523
+ *
524
+ * Defaults to 1. Ranges from 0 to 1. Use temp closer to 0 for analytical /
525
+ * multiple choice, and closer to 1 for creative and generative tasks.
526
+ */
527
+ temperature?: number;
528
+
529
+ /**
530
+ * Only sample from the top K options for each subsequent token.
531
+ *
532
+ * Used to remove "long tail" low probability responses.
533
+ * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
534
+ */
535
+ top_k?: number;
536
+
537
+ /**
538
+ * Use nucleus sampling.
539
+ *
540
+ * In nucleus sampling, we compute the cumulative distribution over all the options
541
+ * for each subsequent token in decreasing probability order and cut it off once it
542
+ * reaches a particular probability specified by `top_p`. You should either alter
543
+ * `temperature` or `top_p`, but not both.
544
+ */
545
+ top_p?: number;
546
+ }
547
+
548
+ export namespace MessageStreamParams {
549
+ /**
550
+ * An object describing metadata about the request.
551
+ */
552
+ export interface Metadata {
553
+ /**
554
+ * An external identifier for the user who is associated with the request.
555
+ *
556
+ * This should be a uuid, hash value, or other opaque identifier. Anthropic may use
557
+ * this id to help detect abuse. Do not include any identifying information such as
558
+ * name, email address, or phone number.
559
+ */
560
+ user_id?: string;
561
+ }
562
+ }
563
+
564
+ export namespace Messages {
565
+ export import ContentBlock = MessagesAPI.ContentBlock;
566
+ export import ContentBlockDeltaEvent = MessagesAPI.ContentBlockDeltaEvent;
567
+ export import ContentBlockStartEvent = MessagesAPI.ContentBlockStartEvent;
568
+ export import ContentBlockStopEvent = MessagesAPI.ContentBlockStopEvent;
569
+ export import Message = MessagesAPI.Message;
570
+ export import MessageDeltaEvent = MessagesAPI.MessageDeltaEvent;
571
+ export import MessageParam = MessagesAPI.MessageParam;
572
+ export import MessageStartEvent = MessagesAPI.MessageStartEvent;
573
+ export import MessageStopEvent = MessagesAPI.MessageStopEvent;
574
+ export import MessageStreamEvent = MessagesAPI.MessageStreamEvent;
575
+ export import TextBlock = MessagesAPI.TextBlock;
576
+ export import TextDelta = MessagesAPI.TextDelta;
577
+ export import MessageCreateParams = MessagesAPI.MessageCreateParams;
578
+ export import MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming;
579
+ export import MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming;
580
+ export import MessageStreamParams = MessagesAPI.MessageStreamParams;
581
+ }