@anthropic-ai/sdk 0.36.2 → 0.37.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 +39 -0
- package/README.md +30 -3
- package/core.d.ts +1 -0
- package/core.d.ts.map +1 -1
- package/core.js +33 -6
- package/core.js.map +1 -1
- package/core.mjs +33 -6
- package/core.mjs.map +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/decoders/line.d.ts +3 -2
- package/internal/decoders/line.d.ts.map +1 -1
- package/internal/decoders/line.js +97 -35
- package/internal/decoders/line.js.map +1 -1
- package/internal/decoders/line.mjs +95 -34
- package/internal/decoders/line.mjs.map +1 -1
- package/lib/BetaMessageStream.d.ts +4 -1
- package/lib/BetaMessageStream.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +79 -22
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +79 -22
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/MessageStream.d.ts +4 -1
- package/lib/MessageStream.d.ts.map +1 -1
- package/lib/MessageStream.js +79 -22
- package/lib/MessageStream.js.map +1 -1
- package/lib/MessageStream.mjs +79 -22
- package/lib/MessageStream.mjs.map +1 -1
- package/package.json +29 -8
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.js +6 -0
- package/pagination.js.map +1 -1
- package/pagination.mjs +6 -0
- package/pagination.mjs.map +1 -1
- package/resources/beta/beta.d.ts +3 -3
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.ts +1 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/messages/batches.d.ts +22 -0
- package/resources/beta/messages/batches.d.ts.map +1 -1
- package/resources/beta/messages/batches.js +3 -0
- package/resources/beta/messages/batches.js.map +1 -1
- package/resources/beta/messages/batches.mjs +3 -0
- package/resources/beta/messages/batches.mjs.map +1 -1
- package/resources/beta/messages/index.d.ts +1 -1
- package/resources/beta/messages/index.d.ts.map +1 -1
- package/resources/beta/messages/index.js.map +1 -1
- package/resources/beta/messages/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.ts +148 -13
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +5 -1
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +5 -1
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages/batches.d.ts +22 -0
- package/resources/messages/batches.d.ts.map +1 -1
- package/resources/messages/batches.js +15 -0
- package/resources/messages/batches.js.map +1 -1
- package/resources/messages/batches.mjs +15 -0
- package/resources/messages/batches.mjs.map +1 -1
- package/resources/messages/index.d.ts +1 -1
- package/resources/messages/index.d.ts.map +1 -1
- package/resources/messages/index.js.map +1 -1
- package/resources/messages/index.mjs.map +1 -1
- package/resources/messages/messages.d.ts +129 -14
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +5 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +5 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/src/core.ts +39 -6
- package/src/index.ts +26 -0
- package/src/internal/decoders/line.ts +100 -38
- package/src/lib/BetaMessageStream.ts +87 -22
- package/src/lib/MessageStream.ts +88 -22
- package/src/pagination.ts +8 -0
- package/src/resources/beta/beta.ts +28 -1
- package/src/resources/beta/index.ts +12 -0
- package/src/resources/beta/messages/batches.ts +22 -0
- package/src/resources/beta/messages/index.ts +12 -0
- package/src/resources/beta/messages/messages.ts +212 -14
- package/src/resources/index.ts +13 -0
- package/src/resources/messages/batches.ts +22 -0
- package/src/resources/messages/index.ts +13 -0
- package/src/resources/messages/messages.ts +177 -15
- package/src/streaming.ts +1 -43
- package/src/version.ts +1 -1
- package/streaming.d.ts +0 -2
- package/streaming.d.ts.map +1 -1
- package/streaming.js +2 -38
- package/streaming.js.map +1 -1
- package/streaming.mjs +1 -36
- package/streaming.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -11,6 +11,9 @@ export class Batches extends APIResource {
|
|
|
11
11
|
* The Message Batches API can be used to process multiple Messages API requests at
|
|
12
12
|
* once. Once a Message Batch is created, it begins processing immediately. Batches
|
|
13
13
|
* can take up to 24 hours to complete.
|
|
14
|
+
*
|
|
15
|
+
* Learn more about the Message Batches API in our
|
|
16
|
+
* [user guide](/en/docs/build-with-claude/batch-processing)
|
|
14
17
|
*/
|
|
15
18
|
create(body, options) {
|
|
16
19
|
return this._client.post('/v1/messages/batches', { body, ...options });
|
|
@@ -19,6 +22,9 @@ export class Batches extends APIResource {
|
|
|
19
22
|
* This endpoint is idempotent and can be used to poll for Message Batch
|
|
20
23
|
* completion. To access the results of a Message Batch, make a request to the
|
|
21
24
|
* `results_url` field in the response.
|
|
25
|
+
*
|
|
26
|
+
* Learn more about the Message Batches API in our
|
|
27
|
+
* [user guide](/en/docs/build-with-claude/batch-processing)
|
|
22
28
|
*/
|
|
23
29
|
retrieve(messageBatchId, options) {
|
|
24
30
|
return this._client.get(`/v1/messages/batches/${messageBatchId}`, options);
|
|
@@ -34,6 +40,9 @@ export class Batches extends APIResource {
|
|
|
34
40
|
*
|
|
35
41
|
* Message Batches can only be deleted once they've finished processing. If you'd
|
|
36
42
|
* like to delete an in-progress batch, you must first cancel it.
|
|
43
|
+
*
|
|
44
|
+
* Learn more about the Message Batches API in our
|
|
45
|
+
* [user guide](/en/docs/build-with-claude/batch-processing)
|
|
37
46
|
*/
|
|
38
47
|
delete(messageBatchId, options) {
|
|
39
48
|
return this._client.delete(`/v1/messages/batches/${messageBatchId}`, options);
|
|
@@ -48,6 +57,9 @@ export class Batches extends APIResource {
|
|
|
48
57
|
* which requests were canceled, check the individual results within the batch.
|
|
49
58
|
* Note that cancellation may not result in any canceled requests if they were
|
|
50
59
|
* non-interruptible.
|
|
60
|
+
*
|
|
61
|
+
* Learn more about the Message Batches API in our
|
|
62
|
+
* [user guide](/en/docs/build-with-claude/batch-processing)
|
|
51
63
|
*/
|
|
52
64
|
cancel(messageBatchId, options) {
|
|
53
65
|
return this._client.post(`/v1/messages/batches/${messageBatchId}/cancel`, options);
|
|
@@ -58,6 +70,9 @@ export class Batches extends APIResource {
|
|
|
58
70
|
* Each line in the file is a JSON object containing the result of a single request
|
|
59
71
|
* in the Message Batch. Results are not guaranteed to be in the same order as
|
|
60
72
|
* requests. Use the `custom_id` field to match results to requests.
|
|
73
|
+
*
|
|
74
|
+
* Learn more about the Message Batches API in our
|
|
75
|
+
* [user guide](/en/docs/build-with-claude/batch-processing)
|
|
61
76
|
*/
|
|
62
77
|
async results(messageBatchId, options) {
|
|
63
78
|
const batch = await this.retrieve(messageBatchId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batches.mjs","sourceRoot":"","sources":["../../src/resources/messages/batches.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAIpB,EAAE,IAAI,EAAmB;OACzB,EAAE,YAAY,EAAE;OAChB,EAAE,cAAc,EAAE;AAEzB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"batches.mjs","sourceRoot":"","sources":["../../src/resources/messages/batches.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAIpB,EAAE,IAAI,EAAmB;OACzB,EAAE,YAAY,EAAE;OAChB,EAAE,cAAc,EAAE;AAEzB,MAAM,OAAO,OAA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iB,MAAM,KAAK,CAAC,EAAE,EAAE,CACjG,CAAC;SACH;QAED,OAAO,IAAI,CAAC,OAAO;aAChB,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE;YACtB,GAAG,OAAO;YACV,OAAO,EAAE;gBACP,MAAM,EAAE,oBAAoB;gBAC5B,GAAG,OAAO,EAAE,OAAO;aACpB;YACD,gBAAgB,EAAE,IAAI;SACvB,CAAC;aACD,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IAC5F,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,IAAkB;CAAG;AAiN7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { MessageBatchesPage, Batches, type DeletedMessageBatch, type MessageBatch, type MessageBatchCanceledResult, type MessageBatchErroredResult, type MessageBatchExpiredResult, type MessageBatchIndividualResponse, type MessageBatchRequestCounts, type MessageBatchResult, type MessageBatchSucceededResult, type BatchCreateParams, type BatchListParams, } from "./batches.js";
|
|
2
|
-
export { Messages, type Base64PDFSource, type CacheControlEphemeral, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationsConfigParam, type CitationsDelta, type ContentBlock, type ContentBlockDeltaEvent, type ContentBlockParam, type ContentBlockSource, type ContentBlockSourceContent, type ContentBlockStartEvent, type ContentBlockStopEvent, type DocumentBlockParam, type ImageBlockParam, type InputJSONDelta, type Message, type MessageDeltaEvent, type MessageDeltaUsage, type MessageParam, type MessageStartEvent, type MessageStopEvent, type MessageStreamEvent, type MessageTokensCount, type Metadata, type Model, type PlainTextSource, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type Tool, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceTool, type ToolResultBlockParam, type ToolUseBlock, type ToolUseBlockParam, type Usage, type MessageCreateParams, type MessageCreateParamsBase, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages.js";
|
|
2
|
+
export { Messages, type Base64PDFSource, type CacheControlEphemeral, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationsConfigParam, type CitationsDelta, type ContentBlock, type ContentBlockDeltaEvent, type ContentBlockParam, type ContentBlockSource, type ContentBlockSourceContent, type ContentBlockStartEvent, type ContentBlockStopEvent, type DocumentBlockParam, type ImageBlockParam, type InputJSONDelta, type Message, type MessageCountTokensTool, type MessageDeltaEvent, type MessageDeltaUsage, type MessageParam, type MessageStartEvent, type MessageStopEvent, type MessageStreamEvent, type MessageTokensCount, type Metadata, type Model, type PlainTextSource, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type RedactedThinkingBlock, type RedactedThinkingBlockParam, type SignatureDelta, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type ThinkingBlock, type ThinkingBlockParam, type ThinkingConfigDisabled, type ThinkingConfigEnabled, type ThinkingConfigParam, type ThinkingDelta, type Tool, type ToolBash20250124, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceTool, type ToolResultBlockParam, type ToolTextEditor20250124, type ToolUnion, type ToolUseBlock, type ToolUseBlockParam, type Usage, type MessageCreateParams, type MessageCreateParamsBase, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/messages/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,OAAO,EACP,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,KAAK,EACV,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/messages/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,OAAO,EACP,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,IAAI,EACT,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,KAAK,EACV,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/messages/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAcmB;AAbjB,6GAAA,kBAAkB,OAAA;AAClB,kGAAA,OAAO,OAAA;AAaT,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/messages/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAcmB;AAbjB,6GAAA,kBAAkB,OAAA;AAClB,kGAAA,OAAO,OAAA;AAaT,0CAwEoB;AAvElB,oGAAA,QAAQ,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/messages/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,kBAAkB,EAClB,OAAO,GAYR;OACM,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/messages/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,kBAAkB,EAClB,OAAO,GAYR;OACM,EACL,QAAQ,GAuET"}
|
|
@@ -15,6 +15,8 @@ export declare class Messages extends APIResource {
|
|
|
15
15
|
*
|
|
16
16
|
* The Messages API can be used for either single queries or stateless multi-turn
|
|
17
17
|
* conversations.
|
|
18
|
+
*
|
|
19
|
+
* Learn more about the Messages API in our [user guide](/en/docs/initial-setup)
|
|
18
20
|
*/
|
|
19
21
|
create(body: MessageCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Message>;
|
|
20
22
|
create(body: MessageCreateParamsStreaming, options?: Core.RequestOptions): APIPromise<Stream<RawMessageStreamEvent>>;
|
|
@@ -28,6 +30,9 @@ export declare class Messages extends APIResource {
|
|
|
28
30
|
*
|
|
29
31
|
* The Token Count API can be used to count the number of tokens in a Message,
|
|
30
32
|
* including tools, images, and documents, without creating it.
|
|
33
|
+
*
|
|
34
|
+
* Learn more about token counting in our
|
|
35
|
+
* [user guide](/en/docs/build-with-claude/token-counting)
|
|
31
36
|
*/
|
|
32
37
|
countTokens(body: MessageCountTokensParams, options?: Core.RequestOptions): Core.APIPromise<MessageTokensCount>;
|
|
33
38
|
}
|
|
@@ -94,9 +99,9 @@ export interface CitationsDelta {
|
|
|
94
99
|
citation: CitationCharLocation | CitationPageLocation | CitationContentBlockLocation;
|
|
95
100
|
type: 'citations_delta';
|
|
96
101
|
}
|
|
97
|
-
export type ContentBlock = TextBlock | ToolUseBlock;
|
|
102
|
+
export type ContentBlock = TextBlock | ToolUseBlock | ThinkingBlock | RedactedThinkingBlock;
|
|
98
103
|
export type ContentBlockDeltaEvent = RawContentBlockDeltaEvent;
|
|
99
|
-
export type ContentBlockParam = TextBlockParam | ImageBlockParam | ToolUseBlockParam | ToolResultBlockParam | DocumentBlockParam;
|
|
104
|
+
export type ContentBlockParam = TextBlockParam | ImageBlockParam | ToolUseBlockParam | ToolResultBlockParam | DocumentBlockParam | ThinkingBlockParam | RedactedThinkingBlockParam;
|
|
100
105
|
export interface ContentBlockSource {
|
|
101
106
|
content: string | Array<ContentBlockSourceContent>;
|
|
102
107
|
type: 'content';
|
|
@@ -223,9 +228,13 @@ export interface Message {
|
|
|
223
228
|
*
|
|
224
229
|
* For example, `output_tokens` will be non-zero, even for an empty string response
|
|
225
230
|
* from Claude.
|
|
231
|
+
*
|
|
232
|
+
* Total input tokens in a request is the summation of `input_tokens`,
|
|
233
|
+
* `cache_creation_input_tokens`, and `cache_read_input_tokens`.
|
|
226
234
|
*/
|
|
227
235
|
usage: Usage;
|
|
228
236
|
}
|
|
237
|
+
export type MessageCountTokensTool = ToolBash20250124 | ToolTextEditor20250124 | Tool;
|
|
229
238
|
export type MessageDeltaEvent = RawMessageDeltaEvent;
|
|
230
239
|
export interface MessageDeltaUsage {
|
|
231
240
|
/**
|
|
@@ -262,19 +271,19 @@ export interface Metadata {
|
|
|
262
271
|
* [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
263
272
|
* details and options.
|
|
264
273
|
*/
|
|
265
|
-
export type Model =
|
|
274
|
+
export type Model = 'claude-3-7-sonnet-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-5-haiku-latest' | 'claude-3-5-haiku-20241022' | 'claude-3-5-sonnet-latest' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-sonnet-20240620' | 'claude-3-opus-latest' | 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307' | 'claude-2.1' | 'claude-2.0' | (string & {});
|
|
266
275
|
export interface PlainTextSource {
|
|
267
276
|
data: string;
|
|
268
277
|
media_type: 'text/plain';
|
|
269
278
|
type: 'text';
|
|
270
279
|
}
|
|
271
280
|
export interface RawContentBlockDeltaEvent {
|
|
272
|
-
delta: TextDelta | InputJSONDelta | CitationsDelta;
|
|
281
|
+
delta: TextDelta | InputJSONDelta | CitationsDelta | ThinkingDelta | SignatureDelta;
|
|
273
282
|
index: number;
|
|
274
283
|
type: 'content_block_delta';
|
|
275
284
|
}
|
|
276
285
|
export interface RawContentBlockStartEvent {
|
|
277
|
-
content_block: TextBlock | ToolUseBlock;
|
|
286
|
+
content_block: TextBlock | ToolUseBlock | ThinkingBlock | RedactedThinkingBlock;
|
|
278
287
|
index: number;
|
|
279
288
|
type: 'content_block_start';
|
|
280
289
|
}
|
|
@@ -298,6 +307,9 @@ export interface RawMessageDeltaEvent {
|
|
|
298
307
|
*
|
|
299
308
|
* For example, `output_tokens` will be non-zero, even for an empty string response
|
|
300
309
|
* from Claude.
|
|
310
|
+
*
|
|
311
|
+
* Total input tokens in a request is the summation of `input_tokens`,
|
|
312
|
+
* `cache_creation_input_tokens`, and `cache_read_input_tokens`.
|
|
301
313
|
*/
|
|
302
314
|
usage: MessageDeltaUsage;
|
|
303
315
|
}
|
|
@@ -315,6 +327,18 @@ export interface RawMessageStopEvent {
|
|
|
315
327
|
type: 'message_stop';
|
|
316
328
|
}
|
|
317
329
|
export type RawMessageStreamEvent = RawMessageStartEvent | RawMessageDeltaEvent | RawMessageStopEvent | RawContentBlockStartEvent | RawContentBlockDeltaEvent | RawContentBlockStopEvent;
|
|
330
|
+
export interface RedactedThinkingBlock {
|
|
331
|
+
data: string;
|
|
332
|
+
type: 'redacted_thinking';
|
|
333
|
+
}
|
|
334
|
+
export interface RedactedThinkingBlockParam {
|
|
335
|
+
data: string;
|
|
336
|
+
type: 'redacted_thinking';
|
|
337
|
+
}
|
|
338
|
+
export interface SignatureDelta {
|
|
339
|
+
signature: string;
|
|
340
|
+
type: 'signature_delta';
|
|
341
|
+
}
|
|
318
342
|
export interface TextBlock {
|
|
319
343
|
/**
|
|
320
344
|
* Citations supporting the text block.
|
|
@@ -339,9 +363,53 @@ export interface TextDelta {
|
|
|
339
363
|
text: string;
|
|
340
364
|
type: 'text_delta';
|
|
341
365
|
}
|
|
366
|
+
export interface ThinkingBlock {
|
|
367
|
+
signature: string;
|
|
368
|
+
thinking: string;
|
|
369
|
+
type: 'thinking';
|
|
370
|
+
}
|
|
371
|
+
export interface ThinkingBlockParam {
|
|
372
|
+
signature: string;
|
|
373
|
+
thinking: string;
|
|
374
|
+
type: 'thinking';
|
|
375
|
+
}
|
|
376
|
+
export interface ThinkingConfigDisabled {
|
|
377
|
+
type: 'disabled';
|
|
378
|
+
}
|
|
379
|
+
export interface ThinkingConfigEnabled {
|
|
380
|
+
/**
|
|
381
|
+
* Determines how many tokens Claude can use for its internal reasoning process.
|
|
382
|
+
* Larger budgets can enable more thorough analysis for complex problems, improving
|
|
383
|
+
* response quality.
|
|
384
|
+
*
|
|
385
|
+
* Must be ≥1024 and less than `max_tokens`.
|
|
386
|
+
*
|
|
387
|
+
* See
|
|
388
|
+
* [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
|
|
389
|
+
* for details.
|
|
390
|
+
*/
|
|
391
|
+
budget_tokens: number;
|
|
392
|
+
type: 'enabled';
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Configuration for enabling Claude's extended thinking.
|
|
396
|
+
*
|
|
397
|
+
* When enabled, responses include `thinking` content blocks showing Claude's
|
|
398
|
+
* thinking process before the final answer. Requires a minimum budget of 1,024
|
|
399
|
+
* tokens and counts towards your `max_tokens` limit.
|
|
400
|
+
*
|
|
401
|
+
* See
|
|
402
|
+
* [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
|
|
403
|
+
* for details.
|
|
404
|
+
*/
|
|
405
|
+
export type ThinkingConfigParam = ThinkingConfigEnabled | ThinkingConfigDisabled;
|
|
406
|
+
export interface ThinkingDelta {
|
|
407
|
+
thinking: string;
|
|
408
|
+
type: 'thinking_delta';
|
|
409
|
+
}
|
|
342
410
|
export interface Tool {
|
|
343
411
|
/**
|
|
344
|
-
* [JSON schema](https://json-schema.org/) for this tool's input.
|
|
412
|
+
* [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
|
|
345
413
|
*
|
|
346
414
|
* This defines the shape of the `input` that your tool accepts and that the model
|
|
347
415
|
* will produce.
|
|
@@ -366,7 +434,7 @@ export interface Tool {
|
|
|
366
434
|
}
|
|
367
435
|
export declare namespace Tool {
|
|
368
436
|
/**
|
|
369
|
-
* [JSON schema](https://json-schema.org/) for this tool's input.
|
|
437
|
+
* [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
|
|
370
438
|
*
|
|
371
439
|
* This defines the shape of the `input` that your tool accepts and that the model
|
|
372
440
|
* will produce.
|
|
@@ -377,6 +445,16 @@ export declare namespace Tool {
|
|
|
377
445
|
[k: string]: unknown;
|
|
378
446
|
}
|
|
379
447
|
}
|
|
448
|
+
export interface ToolBash20250124 {
|
|
449
|
+
/**
|
|
450
|
+
* Name of the tool.
|
|
451
|
+
*
|
|
452
|
+
* This is how the tool will be called by the model and in tool_use blocks.
|
|
453
|
+
*/
|
|
454
|
+
name: 'bash';
|
|
455
|
+
type: 'bash_20250124';
|
|
456
|
+
cache_control?: CacheControlEphemeral | null;
|
|
457
|
+
}
|
|
380
458
|
/**
|
|
381
459
|
* How the model should use the provided tools. The model can use a specific tool,
|
|
382
460
|
* any available tool, or decide by itself.
|
|
@@ -432,6 +510,17 @@ export interface ToolResultBlockParam {
|
|
|
432
510
|
content?: string | Array<TextBlockParam | ImageBlockParam>;
|
|
433
511
|
is_error?: boolean;
|
|
434
512
|
}
|
|
513
|
+
export interface ToolTextEditor20250124 {
|
|
514
|
+
/**
|
|
515
|
+
* Name of the tool.
|
|
516
|
+
*
|
|
517
|
+
* This is how the tool will be called by the model and in tool_use blocks.
|
|
518
|
+
*/
|
|
519
|
+
name: 'str_replace_editor';
|
|
520
|
+
type: 'text_editor_20250124';
|
|
521
|
+
cache_control?: CacheControlEphemeral | null;
|
|
522
|
+
}
|
|
523
|
+
export type ToolUnion = ToolBash20250124 | ToolTextEditor20250124 | Tool;
|
|
435
524
|
export interface ToolUseBlock {
|
|
436
525
|
id: string;
|
|
437
526
|
input: unknown;
|
|
@@ -612,6 +701,18 @@ export interface MessageCreateParamsBase {
|
|
|
612
701
|
* deterministic.
|
|
613
702
|
*/
|
|
614
703
|
temperature?: number;
|
|
704
|
+
/**
|
|
705
|
+
* Configuration for enabling Claude's extended thinking.
|
|
706
|
+
*
|
|
707
|
+
* When enabled, responses include `thinking` content blocks showing Claude's
|
|
708
|
+
* thinking process before the final answer. Requires a minimum budget of 1,024
|
|
709
|
+
* tokens and counts towards your `max_tokens` limit.
|
|
710
|
+
*
|
|
711
|
+
* See
|
|
712
|
+
* [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
|
|
713
|
+
* for details.
|
|
714
|
+
*/
|
|
715
|
+
thinking?: ThinkingConfigParam;
|
|
615
716
|
/**
|
|
616
717
|
* How the model should use the provided tools. The model can use a specific tool,
|
|
617
718
|
* any available tool, or decide by itself.
|
|
@@ -629,8 +730,9 @@ export interface MessageCreateParamsBase {
|
|
|
629
730
|
*
|
|
630
731
|
* - `name`: Name of the tool.
|
|
631
732
|
* - `description`: Optional, but strongly-recommended description of the tool.
|
|
632
|
-
* - `input_schema`: [JSON schema](https://json-schema.org/) for the
|
|
633
|
-
* shape that the model will produce in `tool_use` output content
|
|
733
|
+
* - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the
|
|
734
|
+
* tool `input` shape that the model will produce in `tool_use` output content
|
|
735
|
+
* blocks.
|
|
634
736
|
*
|
|
635
737
|
* For example, if you defined `tools` as:
|
|
636
738
|
*
|
|
@@ -687,7 +789,7 @@ export interface MessageCreateParamsBase {
|
|
|
687
789
|
*
|
|
688
790
|
* See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
|
|
689
791
|
*/
|
|
690
|
-
tools?: Array<
|
|
792
|
+
tools?: Array<ToolUnion>;
|
|
691
793
|
/**
|
|
692
794
|
* Only sample from the top K options for each subsequent token.
|
|
693
795
|
*
|
|
@@ -854,6 +956,18 @@ export interface MessageCountTokensParams {
|
|
|
854
956
|
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
|
|
855
957
|
*/
|
|
856
958
|
system?: string | Array<TextBlockParam>;
|
|
959
|
+
/**
|
|
960
|
+
* Configuration for enabling Claude's extended thinking.
|
|
961
|
+
*
|
|
962
|
+
* When enabled, responses include `thinking` content blocks showing Claude's
|
|
963
|
+
* thinking process before the final answer. Requires a minimum budget of 1,024
|
|
964
|
+
* tokens and counts towards your `max_tokens` limit.
|
|
965
|
+
*
|
|
966
|
+
* See
|
|
967
|
+
* [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
|
|
968
|
+
* for details.
|
|
969
|
+
*/
|
|
970
|
+
thinking?: ThinkingConfigParam;
|
|
857
971
|
/**
|
|
858
972
|
* How the model should use the provided tools. The model can use a specific tool,
|
|
859
973
|
* any available tool, or decide by itself.
|
|
@@ -871,8 +985,9 @@ export interface MessageCountTokensParams {
|
|
|
871
985
|
*
|
|
872
986
|
* - `name`: Name of the tool.
|
|
873
987
|
* - `description`: Optional, but strongly-recommended description of the tool.
|
|
874
|
-
* - `input_schema`: [JSON schema](https://json-schema.org/) for the
|
|
875
|
-
* shape that the model will produce in `tool_use` output content
|
|
988
|
+
* - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the
|
|
989
|
+
* tool `input` shape that the model will produce in `tool_use` output content
|
|
990
|
+
* blocks.
|
|
876
991
|
*
|
|
877
992
|
* For example, if you defined `tools` as:
|
|
878
993
|
*
|
|
@@ -929,10 +1044,10 @@ export interface MessageCountTokensParams {
|
|
|
929
1044
|
*
|
|
930
1045
|
* See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
|
|
931
1046
|
*/
|
|
932
|
-
tools?: Array<
|
|
1047
|
+
tools?: Array<MessageCountTokensTool>;
|
|
933
1048
|
}
|
|
934
1049
|
export declare namespace Messages {
|
|
935
|
-
export { type Base64PDFSource as Base64PDFSource, type CacheControlEphemeral as CacheControlEphemeral, type CitationCharLocation as CitationCharLocation, type CitationCharLocationParam as CitationCharLocationParam, type CitationContentBlockLocation as CitationContentBlockLocation, type CitationContentBlockLocationParam as CitationContentBlockLocationParam, type CitationPageLocation as CitationPageLocation, type CitationPageLocationParam as CitationPageLocationParam, type CitationsConfigParam as CitationsConfigParam, type CitationsDelta as CitationsDelta, type ContentBlock as ContentBlock, type ContentBlockDeltaEvent as ContentBlockDeltaEvent, type ContentBlockParam as ContentBlockParam, type ContentBlockSource as ContentBlockSource, type ContentBlockSourceContent as ContentBlockSourceContent, type ContentBlockStartEvent as ContentBlockStartEvent, type ContentBlockStopEvent as ContentBlockStopEvent, type DocumentBlockParam as DocumentBlockParam, type ImageBlockParam as ImageBlockParam, type InputJsonDelta as InputJsonDelta, type InputJSONDelta as InputJSONDelta, type Message as Message, type MessageDeltaEvent as MessageDeltaEvent, type MessageDeltaUsage as MessageDeltaUsage, type MessageParam as MessageParam, type MessageStartEvent as MessageStartEvent, type MessageStopEvent as MessageStopEvent, type MessageStreamEvent as MessageStreamEvent, type MessageTokensCount as MessageTokensCount, type Metadata as Metadata, type Model as Model, type PlainTextSource as PlainTextSource, type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent, type RawContentBlockStartEvent as RawContentBlockStartEvent, type RawContentBlockStopEvent as RawContentBlockStopEvent, type RawMessageDeltaEvent as RawMessageDeltaEvent, type RawMessageStartEvent as RawMessageStartEvent, type RawMessageStopEvent as RawMessageStopEvent, type RawMessageStreamEvent as RawMessageStreamEvent, type TextBlock as TextBlock, type TextBlockParam as TextBlockParam, type TextCitation as TextCitation, type TextCitationParam as TextCitationParam, type TextDelta as TextDelta, type Tool as Tool, type ToolChoice as ToolChoice, type ToolChoiceAny as ToolChoiceAny, type ToolChoiceAuto as ToolChoiceAuto, type ToolChoiceTool as ToolChoiceTool, type ToolResultBlockParam as ToolResultBlockParam, type ToolUseBlock as ToolUseBlock, type ToolUseBlockParam as ToolUseBlockParam, type Usage as Usage, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageStreamParams as MessageStreamParams, type MessageCountTokensParams as MessageCountTokensParams, };
|
|
1050
|
+
export { type Base64PDFSource as Base64PDFSource, type CacheControlEphemeral as CacheControlEphemeral, type CitationCharLocation as CitationCharLocation, type CitationCharLocationParam as CitationCharLocationParam, type CitationContentBlockLocation as CitationContentBlockLocation, type CitationContentBlockLocationParam as CitationContentBlockLocationParam, type CitationPageLocation as CitationPageLocation, type CitationPageLocationParam as CitationPageLocationParam, type CitationsConfigParam as CitationsConfigParam, type CitationsDelta as CitationsDelta, type ContentBlock as ContentBlock, type ContentBlockDeltaEvent as ContentBlockDeltaEvent, type ContentBlockParam as ContentBlockParam, type ContentBlockSource as ContentBlockSource, type ContentBlockSourceContent as ContentBlockSourceContent, type ContentBlockStartEvent as ContentBlockStartEvent, type ContentBlockStopEvent as ContentBlockStopEvent, type DocumentBlockParam as DocumentBlockParam, type ImageBlockParam as ImageBlockParam, type InputJsonDelta as InputJsonDelta, type InputJSONDelta as InputJSONDelta, type Message as Message, type MessageCountTokensTool as MessageCountTokensTool, type MessageDeltaEvent as MessageDeltaEvent, type MessageDeltaUsage as MessageDeltaUsage, type MessageParam as MessageParam, type MessageStartEvent as MessageStartEvent, type MessageStopEvent as MessageStopEvent, type MessageStreamEvent as MessageStreamEvent, type MessageTokensCount as MessageTokensCount, type Metadata as Metadata, type Model as Model, type PlainTextSource as PlainTextSource, type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent, type RawContentBlockStartEvent as RawContentBlockStartEvent, type RawContentBlockStopEvent as RawContentBlockStopEvent, type RawMessageDeltaEvent as RawMessageDeltaEvent, type RawMessageStartEvent as RawMessageStartEvent, type RawMessageStopEvent as RawMessageStopEvent, type RawMessageStreamEvent as RawMessageStreamEvent, type RedactedThinkingBlock as RedactedThinkingBlock, type RedactedThinkingBlockParam as RedactedThinkingBlockParam, type SignatureDelta as SignatureDelta, type TextBlock as TextBlock, type TextBlockParam as TextBlockParam, type TextCitation as TextCitation, type TextCitationParam as TextCitationParam, type TextDelta as TextDelta, type ThinkingBlock as ThinkingBlock, type ThinkingBlockParam as ThinkingBlockParam, type ThinkingConfigDisabled as ThinkingConfigDisabled, type ThinkingConfigEnabled as ThinkingConfigEnabled, type ThinkingConfigParam as ThinkingConfigParam, type ThinkingDelta as ThinkingDelta, type Tool as Tool, type ToolBash20250124 as ToolBash20250124, type ToolChoice as ToolChoice, type ToolChoiceAny as ToolChoiceAny, type ToolChoiceAuto as ToolChoiceAuto, type ToolChoiceTool as ToolChoiceTool, type ToolResultBlockParam as ToolResultBlockParam, type ToolTextEditor20250124 as ToolTextEditor20250124, type ToolUnion as ToolUnion, type ToolUseBlock as ToolUseBlock, type ToolUseBlockParam as ToolUseBlockParam, type Usage as Usage, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageStreamParams as MessageStreamParams, type MessageCountTokensParams as MessageCountTokensParams, };
|
|
936
1051
|
export { Batches as Batches, type DeletedMessageBatch as DeletedMessageBatch, type MessageBatch as MessageBatch, type MessageBatchCanceledResult as MessageBatchCanceledResult, type MessageBatchErroredResult as MessageBatchErroredResult, type MessageBatchExpiredResult as MessageBatchExpiredResult, type MessageBatchIndividualResponse as MessageBatchIndividualResponse, type MessageBatchRequestCounts as MessageBatchRequestCounts, type MessageBatchResult as MessageBatchResult, type MessageBatchSucceededResult as MessageBatchSucceededResult, MessageBatchesPage as MessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, };
|
|
937
1052
|
}
|
|
938
1053
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,WAAW,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,UAAU,MAAM,WAAW,CAAC;AACxC,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,0BAA0B,EAC1B,yBAAyB,EACzB,yBAAyB,EACzB,8BAA8B,EAC9B,yBAAyB,EACzB,kBAAkB,EAClB,2BAA2B,EAC3B,kBAAkB,EACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,qBAAa,QAAS,SAAQ,WAAW;IACvC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IACjG,MAAM,CACJ,IAAI,EAAE,4BAA4B,EAClC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAC5C,MAAM,CACJ,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,G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IAAI,mBAAmB,EAC/C,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,kBAAkB,IAAI,kBAAkB,EACxC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -42,7 +42,8 @@ class Messages extends resource_1.APIResource {
|
|
|
42
42
|
}
|
|
43
43
|
return this._client.post('/v1/messages', {
|
|
44
44
|
body,
|
|
45
|
-
timeout: this._client._options.timeout ??
|
|
45
|
+
timeout: this._client._options.timeout ??
|
|
46
|
+
(body.stream ? 600000 : this._client._calculateNonstreamingTimeout(body.max_tokens)),
|
|
46
47
|
...options,
|
|
47
48
|
stream: body.stream ?? false,
|
|
48
49
|
});
|
|
@@ -58,6 +59,9 @@ class Messages extends resource_1.APIResource {
|
|
|
58
59
|
*
|
|
59
60
|
* The Token Count API can be used to count the number of tokens in a Message,
|
|
60
61
|
* including tools, images, and documents, without creating it.
|
|
62
|
+
*
|
|
63
|
+
* Learn more about token counting in our
|
|
64
|
+
* [user guide](/en/docs/build-with-claude/token-counting)
|
|
61
65
|
*/
|
|
62
66
|
countTokens(body, options) {
|
|
63
67
|
return this._client.post('/v1/messages/count_tokens', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":";AAAA,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M,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,6BAAa,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;OAQG;IACH,WAAW,CACT,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AAhED,4BAgEC;AAwVD,MAAM,iBAAiB,GAEnB;IACF,YAAY,EAAE,oBAAoB;IAClC,iBAAiB,EAAE,oBAAoB;IACvC,oBAAoB,EAAE,oBAAoB;IAC1C,yBAAyB,EAAE,oBAAoB;IAC/C,oBAAoB,EAAE,oBAAoB;IAC1C,0BAA0B,EAAE,iBAAiB;IAC7C,YAAY,EAAE,iBAAiB;IAC/B,YAAY,EAAE,iBAAiB;CAChC,CAAC;AAq4BF,QAAQ,CAAC,OAAO,GAAG,iBAAO,CAAC;AAC3B,QAAQ,CAAC,kBAAkB,GAAG,4BAAkB,CAAC"}
|
|
@@ -15,7 +15,8 @@ export class Messages extends APIResource {
|
|
|
15
15
|
}
|
|
16
16
|
return this._client.post('/v1/messages', {
|
|
17
17
|
body,
|
|
18
|
-
timeout: this._client._options.timeout ??
|
|
18
|
+
timeout: this._client._options.timeout ??
|
|
19
|
+
(body.stream ? 600000 : this._client._calculateNonstreamingTimeout(body.max_tokens)),
|
|
19
20
|
...options,
|
|
20
21
|
stream: body.stream ?? false,
|
|
21
22
|
});
|
|
@@ -31,6 +32,9 @@ export class Messages extends APIResource {
|
|
|
31
32
|
*
|
|
32
33
|
* The Token Count API can be used to count the number of tokens in a Message,
|
|
33
34
|
* including tools, images, and documents, without creating it.
|
|
35
|
+
*
|
|
36
|
+
* Learn more about token counting in our
|
|
37
|
+
* [user guide](/en/docs/build-with-claude/token-counting)
|
|
34
38
|
*/
|
|
35
39
|
countTokens(body, options) {
|
|
36
40
|
return this._client.post('/v1/messages/count_tokens', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,KAAK,UAAU;OACf,EAGL,OAAO,EAUP,kBAAkB,GACnB;OAEM,EAAE,aAAa,EAAE;OAEjB,EAAE,aAAa,EAAE;AAExB,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,KAAK,UAAU;OACf,EAGL,OAAO,EAUP,kBAAkB,GACnB;OAEM,EAAE,aAAa,EAAE;OAEjB,EAAE,aAAa,EAAE;AAExB,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA+DrE,CAAC;IA3CC,MAAM,CACJ,IAAyB,EACzB,OAA6B;QAE7B,IAAI,IAAI,CAAC,KAAK,IAAI,iBAAiB,EAAE;YACnC,OAAO,CAAC,IAAI,CACV,cAAc,IAAI,CAAC,KAAK,iDACtB,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAC9B,gIAAgI,CACjI,CAAC;SACH;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EACJ,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO;gBACtC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACtF,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAAoE,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,aAAa,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;OAQG;IACH,WAAW,CACT,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AAwVD,MAAM,iBAAiB,GAEnB;IACF,YAAY,EAAE,oBAAoB;IAClC,iBAAiB,EAAE,oBAAoB;IACvC,oBAAoB,EAAE,oBAAoB;IAC1C,yBAAyB,EAAE,oBAAoB;IAC/C,oBAAoB,EAAE,oBAAoB;IAC1C,0BAA0B,EAAE,iBAAiB;IAC7C,YAAY,EAAE,iBAAiB;IAC/B,YAAY,EAAE,iBAAiB;CAChC,CAAC;AAq4BF,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;AAC3B,QAAQ,CAAC,kBAAkB,GAAG,kBAAkB,CAAC"}
|
package/src/core.ts
CHANGED
|
@@ -314,6 +314,7 @@ export abstract class APIClient {
|
|
|
314
314
|
options: FinalRequestOptions<Req>,
|
|
315
315
|
{ retryCount = 0 }: { retryCount?: number } = {},
|
|
316
316
|
): { req: RequestInit; url: string; timeout: number } {
|
|
317
|
+
options = { ...options };
|
|
317
318
|
const { method, path, query, headers: headers = {} } = options;
|
|
318
319
|
|
|
319
320
|
const body =
|
|
@@ -326,9 +327,9 @@ export abstract class APIClient {
|
|
|
326
327
|
|
|
327
328
|
const url = this.buildURL(path!, query);
|
|
328
329
|
if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
|
|
329
|
-
|
|
330
|
+
options.timeout = options.timeout ?? this.timeout;
|
|
330
331
|
const httpAgent = options.httpAgent ?? this.httpAgent ?? getDefaultAgent(url);
|
|
331
|
-
const minAgentTimeout = timeout + 1000;
|
|
332
|
+
const minAgentTimeout = options.timeout + 1000;
|
|
332
333
|
if (
|
|
333
334
|
typeof (httpAgent as any)?.options?.timeout === 'number' &&
|
|
334
335
|
minAgentTimeout > ((httpAgent as any).options.timeout ?? 0)
|
|
@@ -357,7 +358,7 @@ export abstract class APIClient {
|
|
|
357
358
|
signal: options.signal ?? null,
|
|
358
359
|
};
|
|
359
360
|
|
|
360
|
-
return { req, url, timeout };
|
|
361
|
+
return { req, url, timeout: options.timeout };
|
|
361
362
|
}
|
|
362
363
|
|
|
363
364
|
private buildHeaders({
|
|
@@ -385,21 +386,40 @@ export abstract class APIClient {
|
|
|
385
386
|
delete reqHeaders['content-type'];
|
|
386
387
|
}
|
|
387
388
|
|
|
388
|
-
// Don't set
|
|
389
|
-
//
|
|
390
|
-
//
|
|
389
|
+
// Don't set theses headers if they were already set or removed through default headers or by the caller.
|
|
390
|
+
// We check `defaultHeaders` and `headers`, which can contain nulls, instead of `reqHeaders` to account
|
|
391
|
+
// for the removal case.
|
|
391
392
|
if (
|
|
392
393
|
getHeader(defaultHeaders, 'x-stainless-retry-count') === undefined &&
|
|
393
394
|
getHeader(headers, 'x-stainless-retry-count') === undefined
|
|
394
395
|
) {
|
|
395
396
|
reqHeaders['x-stainless-retry-count'] = String(retryCount);
|
|
396
397
|
}
|
|
398
|
+
if (
|
|
399
|
+
getHeader(defaultHeaders, 'x-stainless-timeout') === undefined &&
|
|
400
|
+
getHeader(headers, 'x-stainless-timeout') === undefined &&
|
|
401
|
+
options.timeout
|
|
402
|
+
) {
|
|
403
|
+
reqHeaders['x-stainless-timeout'] = String(options.timeout);
|
|
404
|
+
}
|
|
397
405
|
|
|
398
406
|
this.validateHeaders(reqHeaders, headers);
|
|
399
407
|
|
|
400
408
|
return reqHeaders;
|
|
401
409
|
}
|
|
402
410
|
|
|
411
|
+
_calculateNonstreamingTimeout(maxTokens: number): number {
|
|
412
|
+
const defaultTimeout = 10 * 60;
|
|
413
|
+
const expectedTimeout = (60 * 60 * maxTokens) / 128_000;
|
|
414
|
+
if (expectedTimeout > defaultTimeout) {
|
|
415
|
+
throw new AnthropicError(
|
|
416
|
+
'Streaming is strongly recommended for operations that may take longer than 10 minutes. ' +
|
|
417
|
+
'See https://github.com/anthropics/anthropic-sdk-python#streaming-responses for more details',
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
return defaultTimeout * 1000;
|
|
421
|
+
}
|
|
422
|
+
|
|
403
423
|
/**
|
|
404
424
|
* Used as a callback for mutating the given `FinalRequestOptions` object.
|
|
405
425
|
*/
|
|
@@ -566,10 +586,23 @@ export abstract class APIClient {
|
|
|
566
586
|
fetchOptions.method = fetchOptions.method.toUpperCase();
|
|
567
587
|
}
|
|
568
588
|
|
|
589
|
+
// turn on TCP keep-alive for the sockets, if the runtime supports it
|
|
590
|
+
const socketKeepAliveInterval = 60 * 1000;
|
|
591
|
+
const keepAliveTimeout = setTimeout(() => {
|
|
592
|
+
if (fetchOptions && (fetchOptions as any)?.agent?.sockets) {
|
|
593
|
+
for (const socket of Object.values((fetchOptions as any)?.agent?.sockets).flat()) {
|
|
594
|
+
if ((socket as any)?.setKeepAlive) {
|
|
595
|
+
(socket as any).setKeepAlive(true, socketKeepAliveInterval);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}, socketKeepAliveInterval);
|
|
600
|
+
|
|
569
601
|
return (
|
|
570
602
|
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
|
|
571
603
|
this.fetch.call(undefined, url, fetchOptions).finally(() => {
|
|
572
604
|
clearTimeout(timeout);
|
|
605
|
+
clearTimeout(keepAliveTimeout);
|
|
573
606
|
})
|
|
574
607
|
);
|
|
575
608
|
}
|