@anthropic-ai/sdk 0.25.2 → 0.26.1

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 (65) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/index.d.mts +2 -0
  3. package/index.d.ts +2 -0
  4. package/index.d.ts.map +1 -1
  5. package/index.js +2 -0
  6. package/index.js.map +1 -1
  7. package/index.mjs +2 -0
  8. package/index.mjs.map +1 -1
  9. package/lib/PromptCachingBetaMessageStream.d.ts +96 -0
  10. package/lib/PromptCachingBetaMessageStream.d.ts.map +1 -0
  11. package/lib/PromptCachingBetaMessageStream.js +459 -0
  12. package/lib/PromptCachingBetaMessageStream.js.map +1 -0
  13. package/lib/PromptCachingBetaMessageStream.mjs +455 -0
  14. package/lib/PromptCachingBetaMessageStream.mjs.map +1 -0
  15. package/package.json +1 -1
  16. package/resources/beta/beta.d.ts +9 -0
  17. package/resources/beta/beta.d.ts.map +1 -0
  18. package/resources/beta/beta.js +40 -0
  19. package/resources/beta/beta.js.map +1 -0
  20. package/resources/beta/beta.mjs +13 -0
  21. package/resources/beta/beta.mjs.map +1 -0
  22. package/resources/beta/index.d.ts +3 -0
  23. package/resources/beta/index.d.ts.map +1 -0
  24. package/resources/beta/index.js +9 -0
  25. package/resources/beta/index.js.map +1 -0
  26. package/resources/beta/index.mjs +4 -0
  27. package/resources/beta/index.mjs.map +1 -0
  28. package/resources/beta/prompt-caching/index.d.ts +3 -0
  29. package/resources/beta/prompt-caching/index.d.ts.map +1 -0
  30. package/resources/beta/prompt-caching/index.js +9 -0
  31. package/resources/beta/prompt-caching/index.js.map +1 -0
  32. package/resources/beta/prompt-caching/index.mjs +4 -0
  33. package/resources/beta/prompt-caching/index.mjs.map +1 -0
  34. package/resources/beta/prompt-caching/messages.d.ts +538 -0
  35. package/resources/beta/prompt-caching/messages.d.ts.map +1 -0
  36. package/resources/beta/prompt-caching/messages.js +27 -0
  37. package/resources/beta/prompt-caching/messages.js.map +1 -0
  38. package/resources/beta/prompt-caching/messages.mjs +23 -0
  39. package/resources/beta/prompt-caching/messages.mjs.map +1 -0
  40. package/resources/beta/prompt-caching/prompt-caching.d.ts +23 -0
  41. package/resources/beta/prompt-caching/prompt-caching.d.ts.map +1 -0
  42. package/resources/beta/prompt-caching/prompt-caching.js +40 -0
  43. package/resources/beta/prompt-caching/prompt-caching.js.map +1 -0
  44. package/resources/beta/prompt-caching/prompt-caching.mjs +13 -0
  45. package/resources/beta/prompt-caching/prompt-caching.mjs.map +1 -0
  46. package/resources/index.d.ts +1 -0
  47. package/resources/index.d.ts.map +1 -1
  48. package/resources/index.js +3 -1
  49. package/resources/index.js.map +1 -1
  50. package/resources/index.mjs +1 -0
  51. package/resources/index.mjs.map +1 -1
  52. package/resources/messages.d.ts +2 -2
  53. package/src/index.ts +3 -0
  54. package/src/lib/PromptCachingBetaMessageStream.ts +579 -0
  55. package/src/resources/beta/beta.ts +12 -0
  56. package/src/resources/beta/index.ts +4 -0
  57. package/src/resources/beta/prompt-caching/index.ts +20 -0
  58. package/src/resources/beta/prompt-caching/messages.ts +646 -0
  59. package/src/resources/beta/prompt-caching/prompt-caching.ts +26 -0
  60. package/src/resources/index.ts +1 -0
  61. package/src/resources/messages.ts +2 -2
  62. package/src/version.ts +1 -1
  63. package/version.d.ts +1 -1
  64. package/version.js +1 -1
  65. package/version.mjs +1 -1
@@ -0,0 +1,538 @@
1
+ import { APIResource } from "../../../resource.js";
2
+ import { APIPromise } from "../../../core.js";
3
+ import * as Core from "../../../core.js";
4
+ import * as PromptCachingMessagesAPI from "./messages.js";
5
+ import * as MessagesAPI from "../../messages.js";
6
+ import { Stream } from "../../../streaming.js";
7
+ import { PromptCachingBetaMessageStream } from "../../../lib/PromptCachingBetaMessageStream.js";
8
+ export declare class Messages extends APIResource {
9
+ /**
10
+ * Create a Message.
11
+ *
12
+ * Send a structured list of input messages with text and/or image content, and the
13
+ * model will generate the next message in the conversation.
14
+ *
15
+ * The Messages API can be used for either single queries or stateless multi-turn
16
+ * conversations.
17
+ */
18
+ create(body: MessageCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<PromptCachingBetaMessage>;
19
+ create(body: MessageCreateParamsStreaming, options?: Core.RequestOptions): APIPromise<Stream<RawPromptCachingBetaMessageStreamEvent>>;
20
+ create(body: MessageCreateParamsBase, options?: Core.RequestOptions): APIPromise<Stream<RawPromptCachingBetaMessageStreamEvent> | PromptCachingBetaMessage>;
21
+ /**
22
+ * Create a Message stream
23
+ */
24
+ stream(body: MessageStreamParams, options?: Core.RequestOptions): PromptCachingBetaMessageStream;
25
+ }
26
+ export type MessageStreamParams = MessageCreateParamsBase;
27
+ export interface PromptCachingBetaCacheControlEphemeral {
28
+ type: 'ephemeral';
29
+ }
30
+ export interface PromptCachingBetaImageBlockParam {
31
+ source: PromptCachingBetaImageBlockParam.Source;
32
+ type: 'image';
33
+ cache_control?: PromptCachingBetaCacheControlEphemeral | null;
34
+ }
35
+ export declare namespace PromptCachingBetaImageBlockParam {
36
+ interface Source {
37
+ data: string;
38
+ media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp';
39
+ type: 'base64';
40
+ }
41
+ }
42
+ export interface PromptCachingBetaMessage {
43
+ /**
44
+ * Unique object identifier.
45
+ *
46
+ * The format and length of IDs may change over time.
47
+ */
48
+ id: string;
49
+ /**
50
+ * Content generated by the model.
51
+ *
52
+ * This is an array of content blocks, each of which has a `type` that determines
53
+ * its shape.
54
+ *
55
+ * Example:
56
+ *
57
+ * ```json
58
+ * [{ "type": "text", "text": "Hi, I'm Claude." }]
59
+ * ```
60
+ *
61
+ * If the request input `messages` ended with an `assistant` turn, then the
62
+ * response `content` will continue directly from that last turn. You can use this
63
+ * to constrain the model's output.
64
+ *
65
+ * For example, if the input `messages` were:
66
+ *
67
+ * ```json
68
+ * [
69
+ * {
70
+ * "role": "user",
71
+ * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
72
+ * },
73
+ * { "role": "assistant", "content": "The best answer is (" }
74
+ * ]
75
+ * ```
76
+ *
77
+ * Then the response `content` might be:
78
+ *
79
+ * ```json
80
+ * [{ "type": "text", "text": "B)" }]
81
+ * ```
82
+ */
83
+ content: Array<MessagesAPI.ContentBlock>;
84
+ /**
85
+ * The model that will complete your prompt.\n\nSee
86
+ * [models](https://docs.anthropic.com/en/docs/models-overview) for additional
87
+ * details and options.
88
+ */
89
+ model: MessagesAPI.Model;
90
+ /**
91
+ * Conversational role of the generated message.
92
+ *
93
+ * This will always be `"assistant"`.
94
+ */
95
+ role: 'assistant';
96
+ /**
97
+ * The reason that we stopped.
98
+ *
99
+ * This may be one the following values:
100
+ *
101
+ * - `"end_turn"`: the model reached a natural stopping point
102
+ * - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
103
+ * - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
104
+ * - `"tool_use"`: the model invoked one or more tools
105
+ *
106
+ * In non-streaming mode this value is always non-null. In streaming mode, it is
107
+ * null in the `message_start` event and non-null otherwise.
108
+ */
109
+ stop_reason: 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | null;
110
+ /**
111
+ * Which custom stop sequence was generated, if any.
112
+ *
113
+ * This value will be a non-null string if one of your custom stop sequences was
114
+ * generated.
115
+ */
116
+ stop_sequence: string | null;
117
+ /**
118
+ * Object type.
119
+ *
120
+ * For Messages, this is always `"message"`.
121
+ */
122
+ type: 'message';
123
+ /**
124
+ * Billing and rate-limit usage.
125
+ *
126
+ * Anthropic's API bills and rate-limits by token counts, as tokens represent the
127
+ * underlying cost to our systems.
128
+ *
129
+ * Under the hood, the API transforms requests into a format suitable for the
130
+ * model. The model's output then goes through a parsing stage before becoming an
131
+ * API response. As a result, the token counts in `usage` will not match one-to-one
132
+ * with the exact visible content of an API request or response.
133
+ *
134
+ * For example, `output_tokens` will be non-zero, even for an empty string response
135
+ * from Claude.
136
+ */
137
+ usage: PromptCachingBetaUsage;
138
+ }
139
+ export interface PromptCachingBetaMessageParam {
140
+ content: string | Array<PromptCachingBetaTextBlockParam | PromptCachingBetaImageBlockParam | PromptCachingBetaToolUseBlockParam | PromptCachingBetaToolResultBlockParam>;
141
+ role: 'user' | 'assistant';
142
+ }
143
+ export interface PromptCachingBetaTextBlockParam {
144
+ text: string;
145
+ type: 'text';
146
+ cache_control?: PromptCachingBetaCacheControlEphemeral | null;
147
+ }
148
+ export interface PromptCachingBetaTool {
149
+ /**
150
+ * [JSON schema](https://json-schema.org/) for this tool's input.
151
+ *
152
+ * This defines the shape of the `input` that your tool accepts and that the model
153
+ * will produce.
154
+ */
155
+ input_schema: PromptCachingBetaTool.InputSchema;
156
+ name: string;
157
+ cache_control?: PromptCachingBetaCacheControlEphemeral | null;
158
+ /**
159
+ * Description of what this tool does.
160
+ *
161
+ * Tool descriptions should be as detailed as possible. The more information that
162
+ * the model has about what the tool is and how to use it, the better it will
163
+ * perform. You can use natural language descriptions to reinforce important
164
+ * aspects of the tool input JSON schema.
165
+ */
166
+ description?: string;
167
+ }
168
+ export declare namespace PromptCachingBetaTool {
169
+ /**
170
+ * [JSON schema](https://json-schema.org/) for this tool's input.
171
+ *
172
+ * This defines the shape of the `input` that your tool accepts and that the model
173
+ * will produce.
174
+ */
175
+ interface InputSchema {
176
+ type: 'object';
177
+ properties?: unknown | null;
178
+ [k: string]: unknown;
179
+ }
180
+ }
181
+ export interface PromptCachingBetaToolResultBlockParam {
182
+ tool_use_id: string;
183
+ type: 'tool_result';
184
+ cache_control?: PromptCachingBetaCacheControlEphemeral | null;
185
+ content?: string | Array<PromptCachingBetaTextBlockParam | PromptCachingBetaImageBlockParam>;
186
+ is_error?: boolean;
187
+ }
188
+ export interface PromptCachingBetaToolUseBlockParam {
189
+ id: string;
190
+ input: unknown;
191
+ name: string;
192
+ type: 'tool_use';
193
+ cache_control?: PromptCachingBetaCacheControlEphemeral | null;
194
+ }
195
+ export interface PromptCachingBetaUsage {
196
+ /**
197
+ * The number of input tokens used to create the cache entry.
198
+ */
199
+ cache_creation_input_tokens: number | null;
200
+ /**
201
+ * The number of input tokens read from the cache.
202
+ */
203
+ cache_read_input_tokens: number | null;
204
+ /**
205
+ * The number of input tokens which were used.
206
+ */
207
+ input_tokens: number;
208
+ /**
209
+ * The number of output tokens which were used.
210
+ */
211
+ output_tokens: number;
212
+ }
213
+ export interface RawPromptCachingBetaMessageStartEvent {
214
+ message: PromptCachingBetaMessage;
215
+ type: 'message_start';
216
+ }
217
+ export type RawPromptCachingBetaMessageStreamEvent = RawPromptCachingBetaMessageStartEvent | MessagesAPI.RawMessageDeltaEvent | MessagesAPI.RawMessageStopEvent | MessagesAPI.RawContentBlockStartEvent | MessagesAPI.RawContentBlockDeltaEvent | MessagesAPI.RawContentBlockStopEvent;
218
+ export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming;
219
+ export interface MessageCreateParamsBase {
220
+ /**
221
+ * The maximum number of tokens to generate before stopping.
222
+ *
223
+ * Note that our models may stop _before_ reaching this maximum. This parameter
224
+ * only specifies the absolute maximum number of tokens to generate.
225
+ *
226
+ * Different models have different maximum values for this parameter. See
227
+ * [models](https://docs.anthropic.com/en/docs/models-overview) for details.
228
+ */
229
+ max_tokens: number;
230
+ /**
231
+ * Input messages.
232
+ *
233
+ * Our models are trained to operate on alternating `user` and `assistant`
234
+ * conversational turns. When creating a new `Message`, you specify the prior
235
+ * conversational turns with the `messages` parameter, and the model then generates
236
+ * the next `Message` in the conversation.
237
+ *
238
+ * Each input message must be an object with a `role` and `content`. You can
239
+ * specify a single `user`-role message, or you can include multiple `user` and
240
+ * `assistant` messages. The first message must always use the `user` role.
241
+ *
242
+ * If the final message uses the `assistant` role, the response content will
243
+ * continue immediately from the content in that message. This can be used to
244
+ * constrain part of the model's response.
245
+ *
246
+ * Example with a single `user` message:
247
+ *
248
+ * ```json
249
+ * [{ "role": "user", "content": "Hello, Claude" }]
250
+ * ```
251
+ *
252
+ * Example with multiple conversational turns:
253
+ *
254
+ * ```json
255
+ * [
256
+ * { "role": "user", "content": "Hello there." },
257
+ * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
258
+ * { "role": "user", "content": "Can you explain LLMs in plain English?" }
259
+ * ]
260
+ * ```
261
+ *
262
+ * Example with a partially-filled response from Claude:
263
+ *
264
+ * ```json
265
+ * [
266
+ * {
267
+ * "role": "user",
268
+ * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
269
+ * },
270
+ * { "role": "assistant", "content": "The best answer is (" }
271
+ * ]
272
+ * ```
273
+ *
274
+ * Each input message `content` may be either a single `string` or an array of
275
+ * content blocks, where each block has a specific `type`. Using a `string` for
276
+ * `content` is shorthand for an array of one content block of type `"text"`. The
277
+ * following input messages are equivalent:
278
+ *
279
+ * ```json
280
+ * { "role": "user", "content": "Hello, Claude" }
281
+ * ```
282
+ *
283
+ * ```json
284
+ * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
285
+ * ```
286
+ *
287
+ * Starting with Claude 3 models, you can also send image content blocks:
288
+ *
289
+ * ```json
290
+ * {
291
+ * "role": "user",
292
+ * "content": [
293
+ * {
294
+ * "type": "image",
295
+ * "source": {
296
+ * "type": "base64",
297
+ * "media_type": "image/jpeg",
298
+ * "data": "/9j/4AAQSkZJRg..."
299
+ * }
300
+ * },
301
+ * { "type": "text", "text": "What is in this image?" }
302
+ * ]
303
+ * }
304
+ * ```
305
+ *
306
+ * We currently support the `base64` source type for images, and the `image/jpeg`,
307
+ * `image/png`, `image/gif`, and `image/webp` media types.
308
+ *
309
+ * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
310
+ * more input examples.
311
+ *
312
+ * Note that if you want to include a
313
+ * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
314
+ * the top-level `system` parameter — there is no `"system"` role for input
315
+ * messages in the Messages API.
316
+ */
317
+ messages: Array<PromptCachingBetaMessageParam>;
318
+ /**
319
+ * The model that will complete your prompt.\n\nSee
320
+ * [models](https://docs.anthropic.com/en/docs/models-overview) for additional
321
+ * details and options.
322
+ */
323
+ model: MessagesAPI.Model;
324
+ /**
325
+ * An object describing metadata about the request.
326
+ */
327
+ metadata?: MessageCreateParams.Metadata;
328
+ /**
329
+ * Custom text sequences that will cause the model to stop generating.
330
+ *
331
+ * Our models will normally stop when they have naturally completed their turn,
332
+ * which will result in a response `stop_reason` of `"end_turn"`.
333
+ *
334
+ * If you want the model to stop generating when it encounters custom strings of
335
+ * text, you can use the `stop_sequences` parameter. If the model encounters one of
336
+ * the custom sequences, the response `stop_reason` value will be `"stop_sequence"`
337
+ * and the response `stop_sequence` value will contain the matched stop sequence.
338
+ */
339
+ stop_sequences?: Array<string>;
340
+ /**
341
+ * Whether to incrementally stream the response using server-sent events.
342
+ *
343
+ * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
344
+ * details.
345
+ */
346
+ stream?: boolean;
347
+ /**
348
+ * System prompt.
349
+ *
350
+ * A system prompt is a way of providing context and instructions to Claude, such
351
+ * as specifying a particular goal or role. See our
352
+ * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
353
+ */
354
+ system?: string | Array<PromptCachingBetaTextBlockParam>;
355
+ /**
356
+ * Amount of randomness injected into the response.
357
+ *
358
+ * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`
359
+ * for analytical / multiple choice, and closer to `1.0` for creative and
360
+ * generative tasks.
361
+ *
362
+ * Note that even with `temperature` of `0.0`, the results will not be fully
363
+ * deterministic.
364
+ */
365
+ temperature?: number;
366
+ /**
367
+ * How the model should use the provided tools. The model can use a specific tool,
368
+ * any available tool, or decide by itself.
369
+ */
370
+ tool_choice?: MessageCreateParams.ToolChoiceAuto | MessageCreateParams.ToolChoiceAny | MessageCreateParams.ToolChoiceTool;
371
+ /**
372
+ * Definitions of tools that the model may use.
373
+ *
374
+ * If you include `tools` in your API request, the model may return `tool_use`
375
+ * content blocks that represent the model's use of those tools. You can then run
376
+ * those tools using the tool input generated by the model and then optionally
377
+ * return results back to the model using `tool_result` content blocks.
378
+ *
379
+ * Each tool definition includes:
380
+ *
381
+ * - `name`: Name of the tool.
382
+ * - `description`: Optional, but strongly-recommended description of the tool.
383
+ * - `input_schema`: [JSON schema](https://json-schema.org/) for the tool `input`
384
+ * shape that the model will produce in `tool_use` output content blocks.
385
+ *
386
+ * For example, if you defined `tools` as:
387
+ *
388
+ * ```json
389
+ * [
390
+ * {
391
+ * "name": "get_stock_price",
392
+ * "description": "Get the current stock price for a given ticker symbol.",
393
+ * "input_schema": {
394
+ * "type": "object",
395
+ * "properties": {
396
+ * "ticker": {
397
+ * "type": "string",
398
+ * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
399
+ * }
400
+ * },
401
+ * "required": ["ticker"]
402
+ * }
403
+ * }
404
+ * ]
405
+ * ```
406
+ *
407
+ * And then asked the model "What's the S&P 500 at today?", the model might produce
408
+ * `tool_use` content blocks in the response like this:
409
+ *
410
+ * ```json
411
+ * [
412
+ * {
413
+ * "type": "tool_use",
414
+ * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
415
+ * "name": "get_stock_price",
416
+ * "input": { "ticker": "^GSPC" }
417
+ * }
418
+ * ]
419
+ * ```
420
+ *
421
+ * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an
422
+ * input, and return the following back to the model in a subsequent `user`
423
+ * message:
424
+ *
425
+ * ```json
426
+ * [
427
+ * {
428
+ * "type": "tool_result",
429
+ * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
430
+ * "content": "259.75 USD"
431
+ * }
432
+ * ]
433
+ * ```
434
+ *
435
+ * Tools can be used for workflows that include running client-side tools and
436
+ * functions, or more generally whenever you want the model to produce a particular
437
+ * JSON structure of output.
438
+ *
439
+ * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
440
+ */
441
+ tools?: Array<PromptCachingBetaTool>;
442
+ /**
443
+ * Only sample from the top K options for each subsequent token.
444
+ *
445
+ * Used to remove "long tail" low probability responses.
446
+ * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
447
+ *
448
+ * Recommended for advanced use cases only. You usually only need to use
449
+ * `temperature`.
450
+ */
451
+ top_k?: number;
452
+ /**
453
+ * Use nucleus sampling.
454
+ *
455
+ * In nucleus sampling, we compute the cumulative distribution over all the options
456
+ * for each subsequent token in decreasing probability order and cut it off once it
457
+ * reaches a particular probability specified by `top_p`. You should either alter
458
+ * `temperature` or `top_p`, but not both.
459
+ *
460
+ * Recommended for advanced use cases only. You usually only need to use
461
+ * `temperature`.
462
+ */
463
+ top_p?: number;
464
+ }
465
+ export declare namespace MessageCreateParams {
466
+ /**
467
+ * An object describing metadata about the request.
468
+ */
469
+ interface Metadata {
470
+ /**
471
+ * An external identifier for the user who is associated with the request.
472
+ *
473
+ * This should be a uuid, hash value, or other opaque identifier. Anthropic may use
474
+ * this id to help detect abuse. Do not include any identifying information such as
475
+ * name, email address, or phone number.
476
+ */
477
+ user_id?: string | null;
478
+ }
479
+ /**
480
+ * The model will automatically decide whether to use tools.
481
+ */
482
+ interface ToolChoiceAuto {
483
+ type: 'auto';
484
+ }
485
+ /**
486
+ * The model will use any available tools.
487
+ */
488
+ interface ToolChoiceAny {
489
+ type: 'any';
490
+ }
491
+ /**
492
+ * The model will use the specified tool with `tool_choice.name`.
493
+ */
494
+ interface ToolChoiceTool {
495
+ /**
496
+ * The name of the tool to use.
497
+ */
498
+ name: string;
499
+ type: 'tool';
500
+ }
501
+ type MessageCreateParamsNonStreaming = PromptCachingMessagesAPI.MessageCreateParamsNonStreaming;
502
+ type MessageCreateParamsStreaming = PromptCachingMessagesAPI.MessageCreateParamsStreaming;
503
+ }
504
+ export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase {
505
+ /**
506
+ * Whether to incrementally stream the response using server-sent events.
507
+ *
508
+ * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
509
+ * details.
510
+ */
511
+ stream?: false;
512
+ }
513
+ export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
514
+ /**
515
+ * Whether to incrementally stream the response using server-sent events.
516
+ *
517
+ * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
518
+ * details.
519
+ */
520
+ stream: true;
521
+ }
522
+ export declare namespace Messages {
523
+ export import PromptCachingBetaCacheControlEphemeral = PromptCachingMessagesAPI.PromptCachingBetaCacheControlEphemeral;
524
+ export import PromptCachingBetaImageBlockParam = PromptCachingMessagesAPI.PromptCachingBetaImageBlockParam;
525
+ export import PromptCachingBetaMessage = PromptCachingMessagesAPI.PromptCachingBetaMessage;
526
+ export import PromptCachingBetaMessageParam = PromptCachingMessagesAPI.PromptCachingBetaMessageParam;
527
+ export import PromptCachingBetaTextBlockParam = PromptCachingMessagesAPI.PromptCachingBetaTextBlockParam;
528
+ export import PromptCachingBetaTool = PromptCachingMessagesAPI.PromptCachingBetaTool;
529
+ export import PromptCachingBetaToolResultBlockParam = PromptCachingMessagesAPI.PromptCachingBetaToolResultBlockParam;
530
+ export import PromptCachingBetaToolUseBlockParam = PromptCachingMessagesAPI.PromptCachingBetaToolUseBlockParam;
531
+ export import PromptCachingBetaUsage = PromptCachingMessagesAPI.PromptCachingBetaUsage;
532
+ export import RawPromptCachingBetaMessageStartEvent = PromptCachingMessagesAPI.RawPromptCachingBetaMessageStartEvent;
533
+ export import RawPromptCachingBetaMessageStreamEvent = PromptCachingMessagesAPI.RawPromptCachingBetaMessageStreamEvent;
534
+ export import MessageCreateParams = PromptCachingMessagesAPI.MessageCreateParams;
535
+ export import MessageCreateParamsNonStreaming = PromptCachingMessagesAPI.MessageCreateParamsNonStreaming;
536
+ export import MessageCreateParamsStreaming = PromptCachingMessagesAPI.MessageCreateParamsStreaming;
537
+ }
538
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/prompt-caching/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MA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AC;IACjF,MAAM,QAAQ,+BAA+B,GAAG,wBAAwB,CAAC,+BAA+B,CAAC;IACzG,MAAM,QAAQ,4BAA4B,GAAG,wBAAwB,CAAC,4BAA4B,CAAC;CACpG"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Messages = void 0;
5
+ const resource_1 = require("../../../resource.js");
6
+ const PromptCachingBetaMessageStream_1 = require("../../../lib/PromptCachingBetaMessageStream.js");
7
+ class Messages extends resource_1.APIResource {
8
+ create(body, options) {
9
+ return this._client.post('/v1/messages?beta=prompt_caching', {
10
+ body,
11
+ timeout: this._client._options.timeout ?? 600000,
12
+ ...options,
13
+ headers: { 'anthropic-beta': 'prompt-caching-2024-07-31', ...options?.headers },
14
+ stream: body.stream ?? false,
15
+ });
16
+ }
17
+ /**
18
+ * Create a Message stream
19
+ */
20
+ stream(body, options) {
21
+ return PromptCachingBetaMessageStream_1.PromptCachingBetaMessageStream.createMessage(this, body, options);
22
+ }
23
+ }
24
+ exports.Messages = Messages;
25
+ (function (Messages) {
26
+ })(Messages = exports.Messages || (exports.Messages = {}));
27
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/resources/beta/prompt-caching/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAAgD;AAMhD,mGAA6F;AAE7F,MAAa,QAAS,SAAQ,sBAAW;IAsBvC,MAAM,CACJ,IAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE;YAC3D,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;YAC/E,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAAsG,CAAC;IAC1G,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,+DAA8B,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CACF;AAzCD,4BAyCC;AAmkBD,WAAiB,QAAQ;AAezB,CAAC,EAfgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAexB"}
@@ -0,0 +1,23 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../resource.mjs";
3
+ import { PromptCachingBetaMessageStream } from "../../../lib/PromptCachingBetaMessageStream.mjs";
4
+ export class Messages extends APIResource {
5
+ create(body, options) {
6
+ return this._client.post('/v1/messages?beta=prompt_caching', {
7
+ body,
8
+ timeout: this._client._options.timeout ?? 600000,
9
+ ...options,
10
+ headers: { 'anthropic-beta': 'prompt-caching-2024-07-31', ...options?.headers },
11
+ stream: body.stream ?? false,
12
+ });
13
+ }
14
+ /**
15
+ * Create a Message stream
16
+ */
17
+ stream(body, options) {
18
+ return PromptCachingBetaMessageStream.createMessage(this, body, options);
19
+ }
20
+ }
21
+ (function (Messages) {
22
+ })(Messages || (Messages = {}));
23
+ //# sourceMappingURL=messages.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../../src/resources/beta/prompt-caching/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAMf,EAAE,8BAA8B,EAAE;AAEzC,MAAM,OAAO,QAAS,SAAQ,WAAW;IAsBvC,MAAM,CACJ,IAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE;YAC3D,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;YAC/E,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAAsG,CAAC;IAC1G,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,8BAA8B,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CACF;AAmkBD,WAAiB,QAAQ;AAezB,CAAC,EAfgB,QAAQ,KAAR,QAAQ,QAexB"}
@@ -0,0 +1,23 @@
1
+ import { APIResource } from "../../../resource.js";
2
+ import * as MessagesAPI from "./messages.js";
3
+ export declare class PromptCaching extends APIResource {
4
+ messages: MessagesAPI.Messages;
5
+ }
6
+ export declare namespace PromptCaching {
7
+ export import Messages = MessagesAPI.Messages;
8
+ export import PromptCachingBetaCacheControlEphemeral = MessagesAPI.PromptCachingBetaCacheControlEphemeral;
9
+ export import PromptCachingBetaImageBlockParam = MessagesAPI.PromptCachingBetaImageBlockParam;
10
+ export import PromptCachingBetaMessage = MessagesAPI.PromptCachingBetaMessage;
11
+ export import PromptCachingBetaMessageParam = MessagesAPI.PromptCachingBetaMessageParam;
12
+ export import PromptCachingBetaTextBlockParam = MessagesAPI.PromptCachingBetaTextBlockParam;
13
+ export import PromptCachingBetaTool = MessagesAPI.PromptCachingBetaTool;
14
+ export import PromptCachingBetaToolResultBlockParam = MessagesAPI.PromptCachingBetaToolResultBlockParam;
15
+ export import PromptCachingBetaToolUseBlockParam = MessagesAPI.PromptCachingBetaToolUseBlockParam;
16
+ export import PromptCachingBetaUsage = MessagesAPI.PromptCachingBetaUsage;
17
+ export import RawPromptCachingBetaMessageStartEvent = MessagesAPI.RawPromptCachingBetaMessageStartEvent;
18
+ export import RawPromptCachingBetaMessageStreamEvent = MessagesAPI.RawPromptCachingBetaMessageStreamEvent;
19
+ export import MessageCreateParams = MessagesAPI.MessageCreateParams;
20
+ export import MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming;
21
+ export import MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming;
22
+ }
23
+ //# sourceMappingURL=prompt-caching.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-caching.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/prompt-caching/prompt-caching.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,WAAW,MAAM,YAAY,CAAC;AAE1C,qBAAa,aAAc,SAAQ,WAAW;IAC5C,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;CACzE;AAED,yBAAiB,aAAa,CAAC;IAC7B,MAAM,QAAQ,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;IAC9C,MAAM,QAAQ,sCAAsC,GAAG,WAAW,CAAC,sCAAsC,CAAC;IAC1G,MAAM,QAAQ,gCAAgC,GAAG,WAAW,CAAC,gCAAgC,CAAC;IAC9F,MAAM,QAAQ,wBAAwB,GAAG,WAAW,CAAC,wBAAwB,CAAC;IAC9E,MAAM,QAAQ,6BAA6B,GAAG,WAAW,CAAC,6BAA6B,CAAC;IACxF,MAAM,QAAQ,+BAA+B,GAAG,WAAW,CAAC,+BAA+B,CAAC;IAC5F,MAAM,QAAQ,qBAAqB,GAAG,WAAW,CAAC,qBAAqB,CAAC;IACxE,MAAM,QAAQ,qCAAqC,GAAG,WAAW,CAAC,qCAAqC,CAAC;IACxG,MAAM,QAAQ,kCAAkC,GAAG,WAAW,CAAC,kCAAkC,CAAC;IAClG,MAAM,QAAQ,sBAAsB,GAAG,WAAW,CAAC,sBAAsB,CAAC;IAC1E,MAAM,QAAQ,qCAAqC,GAAG,WAAW,CAAC,qCAAqC,CAAC;IACxG,MAAM,QAAQ,sCAAsC,GAAG,WAAW,CAAC,sCAAsC,CAAC;IAC1G,MAAM,QAAQ,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;IACpE,MAAM,QAAQ,+BAA+B,GAAG,WAAW,CAAC,+BAA+B,CAAC;IAC5F,MAAM,QAAQ,4BAA4B,GAAG,WAAW,CAAC,4BAA4B,CAAC;CACvF"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.PromptCaching = void 0;
28
+ const resource_1 = require("../../../resource.js");
29
+ const MessagesAPI = __importStar(require("./messages.js"));
30
+ class PromptCaching extends resource_1.APIResource {
31
+ constructor() {
32
+ super(...arguments);
33
+ this.messages = new MessagesAPI.Messages(this._client);
34
+ }
35
+ }
36
+ exports.PromptCaching = PromptCaching;
37
+ (function (PromptCaching) {
38
+ PromptCaching.Messages = MessagesAPI.Messages;
39
+ })(PromptCaching = exports.PromptCaching || (exports.PromptCaching = {}));
40
+ //# sourceMappingURL=prompt-caching.js.map