@anthropic-ai/sdk 0.65.0 → 0.67.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 +29 -0
- package/bin/cli +12 -5
- package/bin/migration-config.json +76 -1
- package/client.d.mts +5 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -1
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +42 -0
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +42 -0
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +63 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +60 -0
- package/core/pagination.mjs.map +1 -1
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/lib/tools/BetaToolRunner.d.mts.map +1 -1
- package/lib/tools/BetaToolRunner.d.ts.map +1 -1
- package/lib/tools/BetaToolRunner.js +3 -0
- package/lib/tools/BetaToolRunner.js.map +1 -1
- package/lib/tools/BetaToolRunner.mjs +3 -0
- package/lib/tools/BetaToolRunner.mjs.map +1 -1
- package/lib/tools/ToolRunner.d.mts.map +1 -1
- package/lib/tools/ToolRunner.d.ts.map +1 -1
- package/lib/tools/ToolRunner.js +3 -0
- package/lib/tools/ToolRunner.js.map +1 -1
- package/lib/tools/ToolRunner.mjs +3 -0
- package/lib/tools/ToolRunner.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +7 -3
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +7 -3
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +4 -0
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +4 -0
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.mts +2 -1
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +2 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +3 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +1 -0
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/messages/index.d.mts +1 -1
- package/resources/beta/messages/index.d.mts.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.mts +90 -43
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +90 -43
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/skills/index.d.mts +3 -0
- package/resources/beta/skills/index.d.mts.map +1 -0
- package/resources/beta/skills/index.d.ts +3 -0
- package/resources/beta/skills/index.d.ts.map +1 -0
- package/resources/beta/skills/index.js +9 -0
- package/resources/beta/skills/index.js.map +1 -0
- package/resources/beta/skills/index.mjs +4 -0
- package/resources/beta/skills/index.mjs.map +1 -0
- package/resources/beta/skills/skills.d.mts +249 -0
- package/resources/beta/skills/skills.d.mts.map +1 -0
- package/resources/beta/skills/skills.d.ts +249 -0
- package/resources/beta/skills/skills.d.ts.map +1 -0
- package/resources/beta/skills/skills.js +98 -0
- package/resources/beta/skills/skills.js.map +1 -0
- package/resources/beta/skills/skills.mjs +93 -0
- package/resources/beta/skills/skills.mjs.map +1 -0
- package/resources/beta/skills/versions.d.mts +257 -0
- package/resources/beta/skills/versions.d.mts.map +1 -0
- package/resources/beta/skills/versions.d.ts +257 -0
- package/resources/beta/skills/versions.d.ts.map +1 -0
- package/resources/beta/skills/versions.js +100 -0
- package/resources/beta/skills/versions.js.map +1 -0
- package/resources/beta/skills/versions.mjs +96 -0
- package/resources/beta/skills/versions.mjs.map +1 -0
- package/resources/beta/skills.d.mts +2 -0
- package/resources/beta/skills.d.mts.map +1 -0
- package/resources/beta/skills.d.ts +2 -0
- package/resources/beta/skills.d.ts.map +1 -0
- package/resources/beta/skills.js +6 -0
- package/resources/beta/skills.js.map +1 -0
- package/resources/beta/skills.mjs +3 -0
- package/resources/beta/skills.mjs.map +1 -0
- package/resources/completions.d.mts +8 -9
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +8 -9
- package/resources/completions.d.ts.map +1 -1
- package/resources/messages/messages.d.mts +27 -30
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +27 -30
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/src/client.ts +14 -1
- package/src/core/pagination.ts +130 -0
- package/src/internal/to-file.ts +1 -1
- package/src/lib/tools/BetaToolRunner.ts +3 -0
- package/src/lib/tools/ToolRunner.ts +3 -0
- package/src/resources/beta/beta.ts +38 -1
- package/src/resources/beta/index.ts +15 -0
- package/src/resources/beta/messages/index.ts +3 -0
- package/src/resources/beta/messages/messages.ts +101 -42
- package/src/resources/beta/skills/index.ts +26 -0
- package/src/resources/beta/skills/skills.ts +383 -0
- package/src/resources/beta/skills/versions.ts +374 -0
- package/src/resources/beta/skills.ts +3 -0
- package/src/resources/completions.ts +8 -9
- package/src/resources/messages/messages.ts +28 -36
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,100 @@
|
|
|
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.Versions = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
8
|
+
const uploads_1 = require("../../../internal/uploads.js");
|
|
9
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
10
|
+
class Versions extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Create Skill Version
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const version = await client.beta.skills.versions.create(
|
|
17
|
+
* 'skill_id',
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
create(skillID, params = {}, options) {
|
|
22
|
+
const { betas, ...body } = params ?? {};
|
|
23
|
+
return this._client.post((0, path_1.path) `/v1/skills/${skillID}/versions?beta=true`, (0, uploads_1.multipartFormRequestOptions)({
|
|
24
|
+
body,
|
|
25
|
+
...options,
|
|
26
|
+
headers: (0, headers_1.buildHeaders)([
|
|
27
|
+
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
|
|
28
|
+
options?.headers,
|
|
29
|
+
]),
|
|
30
|
+
}, this._client));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get Skill Version
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const version = await client.beta.skills.versions.retrieve(
|
|
38
|
+
* 'version',
|
|
39
|
+
* { skill_id: 'skill_id' },
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
retrieve(version, params, options) {
|
|
44
|
+
const { skill_id, betas } = params;
|
|
45
|
+
return this._client.get((0, path_1.path) `/v1/skills/${skill_id}/versions/${version}?beta=true`, {
|
|
46
|
+
...options,
|
|
47
|
+
headers: (0, headers_1.buildHeaders)([
|
|
48
|
+
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
|
|
49
|
+
options?.headers,
|
|
50
|
+
]),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* List Skill Versions
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* // Automatically fetches more pages as needed.
|
|
59
|
+
* for await (const versionListResponse of client.beta.skills.versions.list(
|
|
60
|
+
* 'skill_id',
|
|
61
|
+
* )) {
|
|
62
|
+
* // ...
|
|
63
|
+
* }
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
list(skillID, params = {}, options) {
|
|
67
|
+
const { betas, ...query } = params ?? {};
|
|
68
|
+
return this._client.getAPIList((0, path_1.path) `/v1/skills/${skillID}/versions?beta=true`, (pagination_1.PageCursor), {
|
|
69
|
+
query,
|
|
70
|
+
...options,
|
|
71
|
+
headers: (0, headers_1.buildHeaders)([
|
|
72
|
+
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
|
|
73
|
+
options?.headers,
|
|
74
|
+
]),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Delete Skill Version
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const version = await client.beta.skills.versions.delete(
|
|
83
|
+
* 'version',
|
|
84
|
+
* { skill_id: 'skill_id' },
|
|
85
|
+
* );
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
delete(version, params, options) {
|
|
89
|
+
const { skill_id, betas } = params;
|
|
90
|
+
return this._client.delete((0, path_1.path) `/v1/skills/${skill_id}/versions/${version}?beta=true`, {
|
|
91
|
+
...options,
|
|
92
|
+
headers: (0, headers_1.buildHeaders)([
|
|
93
|
+
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
|
|
94
|
+
options?.headers,
|
|
95
|
+
]),
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.Versions = Versions;
|
|
100
|
+
//# sourceMappingURL=versions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../src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AE,EACjD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,cAAc,OAAO,qBAAqB,EAC9C,CAAA,uBAA+B,CAAA,EAC/B;YACE,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,OAAe,EACf,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,cAAc,QAAQ,aAAa,OAAO,YAAY,EAAE;YACrF,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AArHD,4BAqHC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { PageCursor } from "../../../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
5
|
+
import { multipartFormRequestOptions } from "../../../internal/uploads.mjs";
|
|
6
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
7
|
+
export class Versions extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create Skill Version
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const version = await client.beta.skills.versions.create(
|
|
14
|
+
* 'skill_id',
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
create(skillID, params = {}, options) {
|
|
19
|
+
const { betas, ...body } = params ?? {};
|
|
20
|
+
return this._client.post(path `/v1/skills/${skillID}/versions?beta=true`, multipartFormRequestOptions({
|
|
21
|
+
body,
|
|
22
|
+
...options,
|
|
23
|
+
headers: buildHeaders([
|
|
24
|
+
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
|
|
25
|
+
options?.headers,
|
|
26
|
+
]),
|
|
27
|
+
}, this._client));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get Skill Version
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const version = await client.beta.skills.versions.retrieve(
|
|
35
|
+
* 'version',
|
|
36
|
+
* { skill_id: 'skill_id' },
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
retrieve(version, params, options) {
|
|
41
|
+
const { skill_id, betas } = params;
|
|
42
|
+
return this._client.get(path `/v1/skills/${skill_id}/versions/${version}?beta=true`, {
|
|
43
|
+
...options,
|
|
44
|
+
headers: buildHeaders([
|
|
45
|
+
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
|
|
46
|
+
options?.headers,
|
|
47
|
+
]),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* List Skill Versions
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* // Automatically fetches more pages as needed.
|
|
56
|
+
* for await (const versionListResponse of client.beta.skills.versions.list(
|
|
57
|
+
* 'skill_id',
|
|
58
|
+
* )) {
|
|
59
|
+
* // ...
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
list(skillID, params = {}, options) {
|
|
64
|
+
const { betas, ...query } = params ?? {};
|
|
65
|
+
return this._client.getAPIList(path `/v1/skills/${skillID}/versions?beta=true`, (PageCursor), {
|
|
66
|
+
query,
|
|
67
|
+
...options,
|
|
68
|
+
headers: buildHeaders([
|
|
69
|
+
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
|
|
70
|
+
options?.headers,
|
|
71
|
+
]),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Delete Skill Version
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const version = await client.beta.skills.versions.delete(
|
|
80
|
+
* 'version',
|
|
81
|
+
* { skill_id: 'skill_id' },
|
|
82
|
+
* );
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
delete(version, params, options) {
|
|
86
|
+
const { skill_id, betas } = params;
|
|
87
|
+
return this._client.delete(path `/v1/skills/${skill_id}/versions/${version}?beta=true`, {
|
|
88
|
+
...options,
|
|
89
|
+
headers: buildHeaders([
|
|
90
|
+
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
|
|
91
|
+
options?.headers,
|
|
92
|
+
]),
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=versions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.mjs","sourceRoot":"","sources":["../../../src/resources/beta/skills/versions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAElD,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,O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BAAqB,EAC9C,CAAA,UAA+B,CAAA,EAC/B;YACE,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,OAAe,EACf,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,cAAc,QAAQ,aAAa,OAAO,YAAY,EAAE;YACrF,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.d.mts","sourceRoot":"","sources":["../../src/resources/beta/skills.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/resources/beta/skills.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./skills/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/resources/beta/skills.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.mjs","sourceRoot":"","sources":["../../src/resources/beta/skills.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -10,10 +10,10 @@ export declare class Completions extends APIResource {
|
|
|
10
10
|
* [Legacy] Create a Text Completion.
|
|
11
11
|
*
|
|
12
12
|
* The Text Completions API is a legacy API. We recommend using the
|
|
13
|
-
* [Messages API](https://docs.
|
|
13
|
+
* [Messages API](https://docs.claude.com/en/api/messages) going forward.
|
|
14
14
|
*
|
|
15
15
|
* Future models and features will not be compatible with Text Completions. See our
|
|
16
|
-
* [migration guide](https://docs.
|
|
16
|
+
* [migration guide](https://docs.claude.com/en/api/migrating-from-text-completions-to-messages)
|
|
17
17
|
* for guidance in migrating from Text Completions to Messages.
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
@@ -88,10 +88,9 @@ export interface CompletionCreateParamsBase {
|
|
|
88
88
|
* "\n\nHuman: {userQuestion}\n\nAssistant:"
|
|
89
89
|
* ```
|
|
90
90
|
*
|
|
91
|
-
* See [prompt validation](https://docs.
|
|
92
|
-
* our guide to
|
|
93
|
-
*
|
|
94
|
-
* details.
|
|
91
|
+
* See [prompt validation](https://docs.claude.com/en/api/prompt-validation) and
|
|
92
|
+
* our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting)
|
|
93
|
+
* for more details.
|
|
95
94
|
*/
|
|
96
95
|
prompt: string;
|
|
97
96
|
/**
|
|
@@ -110,7 +109,7 @@ export interface CompletionCreateParamsBase {
|
|
|
110
109
|
* Body param: Whether to incrementally stream the response using server-sent
|
|
111
110
|
* events.
|
|
112
111
|
*
|
|
113
|
-
* See [streaming](https://docs.
|
|
112
|
+
* See [streaming](https://docs.claude.com/en/api/streaming) for details.
|
|
114
113
|
*/
|
|
115
114
|
stream?: boolean;
|
|
116
115
|
/**
|
|
@@ -164,7 +163,7 @@ export interface CompletionCreateParamsNonStreaming extends CompletionCreatePara
|
|
|
164
163
|
* Body param: Whether to incrementally stream the response using server-sent
|
|
165
164
|
* events.
|
|
166
165
|
*
|
|
167
|
-
* See [streaming](https://docs.
|
|
166
|
+
* See [streaming](https://docs.claude.com/en/api/streaming) for details.
|
|
168
167
|
*/
|
|
169
168
|
stream?: false;
|
|
170
169
|
}
|
|
@@ -173,7 +172,7 @@ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsB
|
|
|
173
172
|
* Body param: Whether to incrementally stream the response using server-sent
|
|
174
173
|
* events.
|
|
175
174
|
*
|
|
176
|
-
* See [streaming](https://docs.
|
|
175
|
+
* See [streaming](https://docs.claude.com/en/api/streaming) for details.
|
|
177
176
|
*/
|
|
178
177
|
stream: true;
|
|
179
178
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.d.mts","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAEzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,MAAM,EAAE,kCAAkC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IACpG,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACzG,MAAM,CACJ,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,UAAU,CAA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;;;OAKG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -10,10 +10,10 @@ export declare class Completions extends APIResource {
|
|
|
10
10
|
* [Legacy] Create a Text Completion.
|
|
11
11
|
*
|
|
12
12
|
* The Text Completions API is a legacy API. We recommend using the
|
|
13
|
-
* [Messages API](https://docs.
|
|
13
|
+
* [Messages API](https://docs.claude.com/en/api/messages) going forward.
|
|
14
14
|
*
|
|
15
15
|
* Future models and features will not be compatible with Text Completions. See our
|
|
16
|
-
* [migration guide](https://docs.
|
|
16
|
+
* [migration guide](https://docs.claude.com/en/api/migrating-from-text-completions-to-messages)
|
|
17
17
|
* for guidance in migrating from Text Completions to Messages.
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
@@ -88,10 +88,9 @@ export interface CompletionCreateParamsBase {
|
|
|
88
88
|
* "\n\nHuman: {userQuestion}\n\nAssistant:"
|
|
89
89
|
* ```
|
|
90
90
|
*
|
|
91
|
-
* See [prompt validation](https://docs.
|
|
92
|
-
* our guide to
|
|
93
|
-
*
|
|
94
|
-
* details.
|
|
91
|
+
* See [prompt validation](https://docs.claude.com/en/api/prompt-validation) and
|
|
92
|
+
* our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting)
|
|
93
|
+
* for more details.
|
|
95
94
|
*/
|
|
96
95
|
prompt: string;
|
|
97
96
|
/**
|
|
@@ -110,7 +109,7 @@ export interface CompletionCreateParamsBase {
|
|
|
110
109
|
* Body param: Whether to incrementally stream the response using server-sent
|
|
111
110
|
* events.
|
|
112
111
|
*
|
|
113
|
-
* See [streaming](https://docs.
|
|
112
|
+
* See [streaming](https://docs.claude.com/en/api/streaming) for details.
|
|
114
113
|
*/
|
|
115
114
|
stream?: boolean;
|
|
116
115
|
/**
|
|
@@ -164,7 +163,7 @@ export interface CompletionCreateParamsNonStreaming extends CompletionCreatePara
|
|
|
164
163
|
* Body param: Whether to incrementally stream the response using server-sent
|
|
165
164
|
* events.
|
|
166
165
|
*
|
|
167
|
-
* See [streaming](https://docs.
|
|
166
|
+
* See [streaming](https://docs.claude.com/en/api/streaming) for details.
|
|
168
167
|
*/
|
|
169
168
|
stream?: false;
|
|
170
169
|
}
|
|
@@ -173,7 +172,7 @@ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsB
|
|
|
173
172
|
* Body param: Whether to incrementally stream the response using server-sent
|
|
174
173
|
* events.
|
|
175
174
|
*
|
|
176
|
-
* See [streaming](https://docs.
|
|
175
|
+
* See [streaming](https://docs.claude.com/en/api/streaming) for details.
|
|
177
176
|
*/
|
|
178
177
|
stream: true;
|
|
179
178
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAEzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,MAAM,EAAE,kCAAkC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IACpG,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACzG,MAAM,CACJ,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,UAAU,C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;;;;;OAKG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -363,7 +363,7 @@ export interface Metadata {
|
|
|
363
363
|
* [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
364
364
|
* details and options.
|
|
365
365
|
*/
|
|
366
|
-
export type Model = 'claude-3-7-sonnet-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-5-haiku-latest' | 'claude-3-5-haiku-20241022' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-0' | 'claude-4-sonnet-20250514' | 'claude-sonnet-4-5' | 'claude-sonnet-4-5-20250929' | 'claude-3-5-sonnet-latest' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-sonnet-20240620' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-4-opus-20250514' | 'claude-opus-4-1-20250805' | 'claude-3-opus-latest' | 'claude-3-opus-20240229' | 'claude-3-haiku-20240307' | (string & {});
|
|
366
|
+
export type Model = 'claude-3-7-sonnet-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-5-haiku-latest' | 'claude-3-5-haiku-20241022' | 'claude-haiku-4-5' | 'claude-haiku-4-5-20251001' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-0' | 'claude-4-sonnet-20250514' | 'claude-sonnet-4-5' | 'claude-sonnet-4-5-20250929' | 'claude-3-5-sonnet-latest' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-sonnet-20240620' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-4-opus-20250514' | 'claude-opus-4-1-20250805' | 'claude-3-opus-latest' | 'claude-3-opus-20240229' | 'claude-3-haiku-20240307' | (string & {});
|
|
367
367
|
export interface PlainTextSource {
|
|
368
368
|
data: string;
|
|
369
369
|
media_type: 'text/plain';
|
|
@@ -465,7 +465,7 @@ export interface SignatureDelta {
|
|
|
465
465
|
signature: string;
|
|
466
466
|
type: 'signature_delta';
|
|
467
467
|
}
|
|
468
|
-
export type StopReason = 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | 'pause_turn' | 'refusal'
|
|
468
|
+
export type StopReason = 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | 'pause_turn' | 'refusal';
|
|
469
469
|
export interface TextBlock {
|
|
470
470
|
/**
|
|
471
471
|
* Citations supporting the text block.
|
|
@@ -515,7 +515,7 @@ export interface ThinkingConfigEnabled {
|
|
|
515
515
|
* Must be ≥1024 and less than `max_tokens`.
|
|
516
516
|
*
|
|
517
517
|
* See
|
|
518
|
-
* [extended thinking](https://docs.
|
|
518
|
+
* [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
519
519
|
* for details.
|
|
520
520
|
*/
|
|
521
521
|
budget_tokens: number;
|
|
@@ -529,7 +529,7 @@ export interface ThinkingConfigEnabled {
|
|
|
529
529
|
* tokens and counts towards your `max_tokens` limit.
|
|
530
530
|
*
|
|
531
531
|
* See
|
|
532
|
-
* [extended thinking](https://docs.
|
|
532
|
+
* [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
533
533
|
* for details.
|
|
534
534
|
*/
|
|
535
535
|
export type ThinkingConfigParam = ThinkingConfigEnabled | ThinkingConfigDisabled;
|
|
@@ -869,7 +869,7 @@ export interface MessageCreateParamsBase {
|
|
|
869
869
|
* only specifies the absolute maximum number of tokens to generate.
|
|
870
870
|
*
|
|
871
871
|
* Different models have different maximum values for this parameter. See
|
|
872
|
-
* [models](https://docs.
|
|
872
|
+
* [models](https://docs.claude.com/en/docs/models-overview) for details.
|
|
873
873
|
*/
|
|
874
874
|
max_tokens: number;
|
|
875
875
|
/**
|
|
@@ -930,12 +930,12 @@ export interface MessageCreateParamsBase {
|
|
|
930
930
|
* { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
931
931
|
* ```
|
|
932
932
|
*
|
|
933
|
-
* See [input examples](https://docs.
|
|
933
|
+
* See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
934
934
|
*
|
|
935
935
|
* Note that if you want to include a
|
|
936
|
-
* [system prompt](https://docs.
|
|
937
|
-
*
|
|
938
|
-
*
|
|
936
|
+
* [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
|
937
|
+
* top-level `system` parameter — there is no `"system"` role for input messages in
|
|
938
|
+
* the Messages API.
|
|
939
939
|
*
|
|
940
940
|
* There is a limit of 100,000 messages in a single request.
|
|
941
941
|
*/
|
|
@@ -955,7 +955,7 @@ export interface MessageCreateParamsBase {
|
|
|
955
955
|
* for this request.
|
|
956
956
|
*
|
|
957
957
|
* Anthropic offers different levels of service for your API requests. See
|
|
958
|
-
* [service-tiers](https://docs.
|
|
958
|
+
* [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
959
959
|
*/
|
|
960
960
|
service_tier?: 'auto' | 'standard_only';
|
|
961
961
|
/**
|
|
@@ -973,8 +973,7 @@ export interface MessageCreateParamsBase {
|
|
|
973
973
|
/**
|
|
974
974
|
* Whether to incrementally stream the response using server-sent events.
|
|
975
975
|
*
|
|
976
|
-
* See [streaming](https://docs.
|
|
977
|
-
* details.
|
|
976
|
+
* See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
|
|
978
977
|
*/
|
|
979
978
|
stream?: boolean;
|
|
980
979
|
/**
|
|
@@ -982,7 +981,7 @@ export interface MessageCreateParamsBase {
|
|
|
982
981
|
*
|
|
983
982
|
* A system prompt is a way of providing context and instructions to Claude, such
|
|
984
983
|
* as specifying a particular goal or role. See our
|
|
985
|
-
* [guide to system prompts](https://docs.
|
|
984
|
+
* [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
986
985
|
*/
|
|
987
986
|
system?: string | Array<TextBlockParam>;
|
|
988
987
|
/**
|
|
@@ -1004,7 +1003,7 @@ export interface MessageCreateParamsBase {
|
|
|
1004
1003
|
* tokens and counts towards your `max_tokens` limit.
|
|
1005
1004
|
*
|
|
1006
1005
|
* See
|
|
1007
|
-
* [extended thinking](https://docs.
|
|
1006
|
+
* [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
1008
1007
|
* for details.
|
|
1009
1008
|
*/
|
|
1010
1009
|
thinking?: ThinkingConfigParam;
|
|
@@ -1023,9 +1022,9 @@ export interface MessageCreateParamsBase {
|
|
|
1023
1022
|
*
|
|
1024
1023
|
* There are two types of tools: **client tools** and **server tools**. The
|
|
1025
1024
|
* behavior described below applies to client tools. For
|
|
1026
|
-
* [server tools](https://docs.
|
|
1025
|
+
* [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
|
1027
1026
|
* see their individual documentation as each has its own behavior (e.g., the
|
|
1028
|
-
* [web search tool](https://docs.
|
|
1027
|
+
* [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
1029
1028
|
*
|
|
1030
1029
|
* Each tool definition includes:
|
|
1031
1030
|
*
|
|
@@ -1088,7 +1087,7 @@ export interface MessageCreateParamsBase {
|
|
|
1088
1087
|
* functions, or more generally whenever you want the model to produce a particular
|
|
1089
1088
|
* JSON structure of output.
|
|
1090
1089
|
*
|
|
1091
|
-
* See our [guide](https://docs.
|
|
1090
|
+
* See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
1092
1091
|
*/
|
|
1093
1092
|
tools?: Array<ToolUnion>;
|
|
1094
1093
|
/**
|
|
@@ -1122,8 +1121,7 @@ export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase
|
|
|
1122
1121
|
/**
|
|
1123
1122
|
* Whether to incrementally stream the response using server-sent events.
|
|
1124
1123
|
*
|
|
1125
|
-
* See [streaming](https://docs.
|
|
1126
|
-
* details.
|
|
1124
|
+
* See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
|
|
1127
1125
|
*/
|
|
1128
1126
|
stream?: false;
|
|
1129
1127
|
}
|
|
@@ -1131,8 +1129,7 @@ export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
|
|
|
1131
1129
|
/**
|
|
1132
1130
|
* Whether to incrementally stream the response using server-sent events.
|
|
1133
1131
|
*
|
|
1134
|
-
* See [streaming](https://docs.
|
|
1135
|
-
* details.
|
|
1132
|
+
* See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
|
|
1136
1133
|
*/
|
|
1137
1134
|
stream: true;
|
|
1138
1135
|
}
|
|
@@ -1196,12 +1193,12 @@ export interface MessageCountTokensParams {
|
|
|
1196
1193
|
* { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
1197
1194
|
* ```
|
|
1198
1195
|
*
|
|
1199
|
-
* See [input examples](https://docs.
|
|
1196
|
+
* See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
1200
1197
|
*
|
|
1201
1198
|
* Note that if you want to include a
|
|
1202
|
-
* [system prompt](https://docs.
|
|
1203
|
-
*
|
|
1204
|
-
*
|
|
1199
|
+
* [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
|
1200
|
+
* top-level `system` parameter — there is no `"system"` role for input messages in
|
|
1201
|
+
* the Messages API.
|
|
1205
1202
|
*
|
|
1206
1203
|
* There is a limit of 100,000 messages in a single request.
|
|
1207
1204
|
*/
|
|
@@ -1217,7 +1214,7 @@ export interface MessageCountTokensParams {
|
|
|
1217
1214
|
*
|
|
1218
1215
|
* A system prompt is a way of providing context and instructions to Claude, such
|
|
1219
1216
|
* as specifying a particular goal or role. See our
|
|
1220
|
-
* [guide to system prompts](https://docs.
|
|
1217
|
+
* [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
1221
1218
|
*/
|
|
1222
1219
|
system?: string | Array<TextBlockParam>;
|
|
1223
1220
|
/**
|
|
@@ -1228,7 +1225,7 @@ export interface MessageCountTokensParams {
|
|
|
1228
1225
|
* tokens and counts towards your `max_tokens` limit.
|
|
1229
1226
|
*
|
|
1230
1227
|
* See
|
|
1231
|
-
* [extended thinking](https://docs.
|
|
1228
|
+
* [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
1232
1229
|
* for details.
|
|
1233
1230
|
*/
|
|
1234
1231
|
thinking?: ThinkingConfigParam;
|
|
@@ -1247,9 +1244,9 @@ export interface MessageCountTokensParams {
|
|
|
1247
1244
|
*
|
|
1248
1245
|
* There are two types of tools: **client tools** and **server tools**. The
|
|
1249
1246
|
* behavior described below applies to client tools. For
|
|
1250
|
-
* [server tools](https://docs.
|
|
1247
|
+
* [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
|
1251
1248
|
* see their individual documentation as each has its own behavior (e.g., the
|
|
1252
|
-
* [web search tool](https://docs.
|
|
1249
|
+
* [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
1253
1250
|
*
|
|
1254
1251
|
* Each tool definition includes:
|
|
1255
1252
|
*
|
|
@@ -1312,7 +1309,7 @@ export interface MessageCountTokensParams {
|
|
|
1312
1309
|
* functions, or more generally whenever you want the model to produce a particular
|
|
1313
1310
|
* JSON structure of output.
|
|
1314
1311
|
*
|
|
1315
|
-
* See our [guide](https://docs.
|
|
1312
|
+
* See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
1316
1313
|
*/
|
|
1317
1314
|
tools?: Array<MessageCountTokensTool>;
|
|
1318
1315
|
}
|