@anthropic-ai/sdk 0.14.0 → 0.14.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.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -3
- package/package.json +1 -1
- package/resources/completions.d.ts +9 -1
- package/resources/completions.d.ts.map +1 -1
- package/resources/completions.js.map +1 -1
- package/resources/completions.mjs.map +1 -1
- package/src/resources/completions.ts +9 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.14.1 (2024-02-22)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [sdk-v0.14.0...sdk-v0.14.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.14.0...sdk-v0.14.1)
|
|
6
|
+
|
|
7
|
+
### Chores
|
|
8
|
+
|
|
9
|
+
* **ci:** update actions/setup-node action to v4 ([#295](https://github.com/anthropics/anthropic-sdk-typescript/issues/295)) ([359a856](https://github.com/anthropics/anthropic-sdk-typescript/commit/359a856c4c93d962ca3e117f4dd799849eb5fa7d))
|
|
10
|
+
* **docs:** remove references to old bedrock package ([#289](https://github.com/anthropics/anthropic-sdk-typescript/issues/289)) ([33b935e](https://github.com/anthropics/anthropic-sdk-typescript/commit/33b935e3d840346dd464445901846d2b22888e1c))
|
|
11
|
+
* **internal:** refactor release environment script ([#294](https://github.com/anthropics/anthropic-sdk-typescript/issues/294)) ([b7f8714](https://github.com/anthropics/anthropic-sdk-typescript/commit/b7f87143b16ad413adb943297e65473fd9b93b71))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Documentation
|
|
15
|
+
|
|
16
|
+
* **readme:** fix header for streaming helpers ([#293](https://github.com/anthropics/anthropic-sdk-typescript/issues/293)) ([7278e6f](https://github.com/anthropics/anthropic-sdk-typescript/commit/7278e6f7d62d837c2af0b1a440dfa97b6a3f6b4e))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Refactors
|
|
20
|
+
|
|
21
|
+
* **api:** mark completions API as legacy ([#291](https://github.com/anthropics/anthropic-sdk-typescript/issues/291)) ([c78e2e2](https://github.com/anthropics/anthropic-sdk-typescript/commit/c78e2e215067fabcc3eaee0a537213f55735b42e))
|
|
22
|
+
|
|
3
23
|
## 0.14.0 (2024-02-13)
|
|
4
24
|
|
|
5
25
|
Full Changelog: [sdk-v0.13.1...sdk-v0.14.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.13.1...sdk-v0.14.0)
|
package/README.md
CHANGED
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
This library provides convenient access to the Anthropic REST API from server-side TypeScript or JavaScript.
|
|
6
6
|
|
|
7
|
-
For the AWS Bedrock API, see [`@anthropic-ai/bedrock-sdk`](https://github.com/anthropics/anthropic-bedrock-typescript).
|
|
8
|
-
|
|
9
7
|
The REST API documentation can be found [on docs.anthropic.com](https://docs.anthropic.com/claude/reference/). The full API of this library can be found in [api.md](api.md).
|
|
10
8
|
|
|
11
9
|
## Installation
|
|
@@ -96,7 +94,7 @@ We provide a [separate package](https://github.com/anthropics/anthropic-tokenize
|
|
|
96
94
|
|
|
97
95
|
See the [repository documentation](https://github.com/anthropics/anthropic-tokenizer-typescript) for more details.
|
|
98
96
|
|
|
99
|
-
|
|
97
|
+
## Streaming Helpers
|
|
100
98
|
|
|
101
99
|
This library provides several conveniences for streaming messages, for example:
|
|
102
100
|
|
package/package.json
CHANGED
|
@@ -5,7 +5,15 @@ import * as CompletionsAPI from '@anthropic-ai/sdk/resources/completions';
|
|
|
5
5
|
import { Stream } from '@anthropic-ai/sdk/streaming';
|
|
6
6
|
export declare class Completions extends APIResource {
|
|
7
7
|
/**
|
|
8
|
-
* Create a Text Completion
|
|
8
|
+
* [Legacy] Create a Text Completion.
|
|
9
|
+
*
|
|
10
|
+
* The Text Completions API is a legacy API. We recommend using the
|
|
11
|
+
* [Messages API](https://docs.anthropic.com/claude/reference/messages_post) going
|
|
12
|
+
* forward.
|
|
13
|
+
*
|
|
14
|
+
* Future models and features will not be compatible with Text Completions. See our
|
|
15
|
+
* [migration guide](https://docs.anthropic.com/claude/reference/migrating-from-text-completions-to-messages)
|
|
16
|
+
* for guidance in migrating from Text Completions to Messages.
|
|
9
17
|
*/
|
|
10
18
|
create(body: CompletionCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Completion>;
|
|
11
19
|
create(body: CompletionCreateParamsStreaming, options?: Core.RequestOptions): APIPromise<Stream<Completion>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,cAAc,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,qBAAa,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,cAAc,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,kCAAkC,EAAE,OAAO,CAAC,EAAE,IAAI,CA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BAAiB,sBAAsB,CAAC;IACtC;;OAEG;IACH,UAAiB,QAAQ;QACvB;;;;;;WAMG;QACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB;IAED,KAAY,kCAAkC,GAAG,cAAc,CAAC,kCAAkC,CAAC;IACnG,KAAY,+BAA+B,GAAG,cAAc,CAAC,+BAA+B,CAAC;CAC9F;AAED,MAAM,WAAW,kCAAmC,SAAQ,0BAA0B;IACpF;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,+BAAgC,SAAQ,0BAA0B;IACjF;;;;;;OAMG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,yBAAiB,WAAW,CAAC;IAC3B,MAAM,QAAQ,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;IACrD,MAAM,QAAQ,sBAAsB,GAAG,cAAc,CAAC,sBAAsB,CAAC;IAC7E,MAAM,QAAQ,kCAAkC,GAAG,cAAc,CAAC,kCAAkC,CAAC;IACrG,MAAM,QAAQ,+BAA+B,GAAG,cAAc,CAAC,+BAA+B,CAAC;CAChG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.js","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAIrD,yDAAyD;AAIzD,MAAa,WAAY,SAAQ,sBAAW;
|
|
1
|
+
{"version":3,"file":"completions.js","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAIrD,yDAAyD;AAIzD,MAAa,WAAY,SAAQ,sBAAW;IAqB1C,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAE,MAAM;YACf,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAA4D,CAAC;IAChE,CAAC;CACF;AAhCD,kCAgCC;AAwKD,WAAiB,WAAW;AAK5B,CAAC,EALgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAK3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAI9C,EAAE,WAAW,EAAE,MAAM,4BAA4B;AAIxD,MAAM,OAAO,WAAY,SAAQ,WAAW;
|
|
1
|
+
{"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAI9C,EAAE,WAAW,EAAE,MAAM,4BAA4B;AAIxD,MAAM,OAAO,WAAY,SAAQ,WAAW;IAqB1C,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAE,MAAM;YACf,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAA4D,CAAC;IAChE,CAAC;CACF;AAwKD,WAAiB,WAAW;AAK5B,CAAC,EALgB,WAAW,KAAX,WAAW,QAK3B"}
|
|
@@ -8,7 +8,15 @@ import { Stream } from "../streaming";
|
|
|
8
8
|
|
|
9
9
|
export class Completions extends APIResource {
|
|
10
10
|
/**
|
|
11
|
-
* Create a Text Completion
|
|
11
|
+
* [Legacy] Create a Text Completion.
|
|
12
|
+
*
|
|
13
|
+
* The Text Completions API is a legacy API. We recommend using the
|
|
14
|
+
* [Messages API](https://docs.anthropic.com/claude/reference/messages_post) going
|
|
15
|
+
* forward.
|
|
16
|
+
*
|
|
17
|
+
* Future models and features will not be compatible with Text Completions. See our
|
|
18
|
+
* [migration guide](https://docs.anthropic.com/claude/reference/migrating-from-text-completions-to-messages)
|
|
19
|
+
* for guidance in migrating from Text Completions to Messages.
|
|
12
20
|
*/
|
|
13
21
|
create(body: CompletionCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Completion>;
|
|
14
22
|
create(
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.14.
|
|
1
|
+
export const VERSION = '0.14.1'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.14.
|
|
1
|
+
export declare const VERSION = "0.14.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.14.
|
|
1
|
+
export const VERSION = '0.14.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|