@anthropic-ai/sdk 0.5.10 → 0.6.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 +28 -0
- package/README.md +48 -20
- package/_shims/ReadableStream.d.ts +38 -0
- package/_shims/ReadableStream.js +5 -0
- package/_shims/ReadableStream.mjs +7 -0
- package/_shims/ReadableStream.node.d.ts +6 -0
- package/_shims/ReadableStream.node.d.ts.map +1 -0
- package/_shims/ReadableStream.node.js +14 -0
- package/_shims/ReadableStream.node.js.map +1 -0
- package/_shims/ReadableStream.node.mjs +3 -0
- package/_shims/ReadableStream.node.mjs.map +1 -0
- package/_shims/fetch.d.ts +8 -1
- package/_shims/fetch.node.d.ts +11 -1
- package/core.d.ts +77 -28
- package/core.d.ts.map +1 -1
- package/core.js +180 -61
- package/core.js.map +1 -1
- package/core.mjs +174 -61
- package/core.mjs.map +1 -1
- package/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/completions.d.ts +115 -191
- package/resources/completions.d.ts.map +1 -1
- package/resources/completions.js.map +1 -1
- package/resources/completions.mjs.map +1 -1
- package/resources/index.d.ts +7 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/src/_shims/ReadableStream.d.ts +38 -0
- package/src/_shims/ReadableStream.js +5 -0
- package/src/_shims/ReadableStream.mjs +7 -0
- package/src/_shims/ReadableStream.node.ts +6 -0
- package/src/_shims/fetch.d.ts +8 -1
- package/src/_shims/fetch.node.d.ts +11 -1
- package/src/core.ts +245 -83
- package/src/index.ts +2 -0
- package/src/resources/completions.ts +120 -202
- package/src/resources/index.ts +7 -1
- package/src/streaming.ts +9 -15
- package/src/version.ts +1 -1
- package/streaming.d.ts +3 -7
- package/streaming.d.ts.map +1 -1
- package/streaming.js +8 -5
- package/streaming.js.map +1 -1
- package/streaming.mjs +7 -4
- package/streaming.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
3
|
import * as Core from '../core';
|
|
4
|
+
import { APIPromise } from '../core';
|
|
4
5
|
import { APIResource } from '../resource';
|
|
5
6
|
import * as API from './index';
|
|
6
7
|
import { Stream } from '../streaming';
|
|
@@ -9,19 +10,18 @@ export class Completions extends APIResource {
|
|
|
9
10
|
/**
|
|
10
11
|
* Create a completion
|
|
11
12
|
*/
|
|
13
|
+
create(body: CompletionCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Completion>;
|
|
12
14
|
create(
|
|
13
|
-
body:
|
|
15
|
+
body: CompletionCreateParamsStreaming,
|
|
14
16
|
options?: Core.RequestOptions,
|
|
15
|
-
):
|
|
16
|
-
create(
|
|
17
|
-
body: CompletionCreateParams.CompletionRequestStreaming,
|
|
18
|
-
options?: Core.RequestOptions,
|
|
19
|
-
): Promise<Core.APIResponse<Stream<Completion>>>;
|
|
17
|
+
): APIPromise<Stream<Completion>>;
|
|
20
18
|
create(
|
|
21
19
|
body: CompletionCreateParams,
|
|
22
20
|
options?: Core.RequestOptions,
|
|
23
|
-
):
|
|
24
|
-
return this.post('/v1/complete', { body, timeout: 600000, ...options, stream: body.stream ?? false })
|
|
21
|
+
): APIPromise<Completion> | APIPromise<Stream<Completion>> {
|
|
22
|
+
return this.post('/v1/complete', { body, timeout: 600000, ...options, stream: body.stream ?? false }) as
|
|
23
|
+
| APIPromise<Completion>
|
|
24
|
+
| APIPromise<Stream<Completion>>;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -48,219 +48,137 @@ export interface Completion {
|
|
|
48
48
|
stop_reason: string;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
export
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
export interface CompletionCreateParams {
|
|
52
|
+
/**
|
|
53
|
+
* The maximum number of tokens to generate before stopping.
|
|
54
|
+
*
|
|
55
|
+
* Note that our models may stop _before_ reaching this maximum. This parameter
|
|
56
|
+
* only specifies the absolute maximum number of tokens to generate.
|
|
57
|
+
*/
|
|
58
|
+
max_tokens_to_sample: number;
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
/**
|
|
61
|
+
* The model that will complete your prompt.
|
|
62
|
+
*
|
|
63
|
+
* As we improve Claude, we develop new versions of it that you can query. This
|
|
64
|
+
* parameter controls which version of Claude answers your request. Right now we
|
|
65
|
+
* are offering two model families: Claude, and Claude Instant. You can use them by
|
|
66
|
+
* setting `model` to `"claude-2"` or `"claude-instant-1"`, respectively. See
|
|
67
|
+
* [models](https://docs.anthropic.com/claude/reference/selecting-a-model) for
|
|
68
|
+
* additional details.
|
|
69
|
+
*/
|
|
70
|
+
model: (string & {}) | 'claude-2' | 'claude-instant-1';
|
|
64
71
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
/**
|
|
73
|
+
* The prompt that you want Claude to complete.
|
|
74
|
+
*
|
|
75
|
+
* For proper response generation you will need to format your prompt as follows:
|
|
76
|
+
*
|
|
77
|
+
* ```javascript
|
|
78
|
+
* const userQuestion = r"Why is the sky blue?";
|
|
79
|
+
* const prompt = `\n\nHuman: ${userQuestion}\n\nAssistant:`;
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* See our
|
|
83
|
+
* [comments on prompts](https://docs.anthropic.com/claude/docs/introduction-to-prompt-design)
|
|
84
|
+
* for more context.
|
|
85
|
+
*/
|
|
86
|
+
prompt: string;
|
|
76
87
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
*
|
|
82
|
-
* ```javascript
|
|
83
|
-
* const userQuestion = r"Why is the sky blue?";
|
|
84
|
-
* const prompt = `\n\nHuman: ${userQuestion}\n\nAssistant:`;
|
|
85
|
-
* ```
|
|
86
|
-
*
|
|
87
|
-
* See our
|
|
88
|
-
* [comments on prompts](https://docs.anthropic.com/claude/docs/introduction-to-prompt-design)
|
|
89
|
-
* for more context.
|
|
90
|
-
*/
|
|
91
|
-
prompt: string;
|
|
88
|
+
/**
|
|
89
|
+
* An object describing metadata about the request.
|
|
90
|
+
*/
|
|
91
|
+
metadata?: CompletionCreateParams.Metadata;
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Sequences that will cause the model to stop generating completion text.
|
|
95
|
+
*
|
|
96
|
+
* Our models stop on `"\n\nHuman:"`, and may include additional built-in stop
|
|
97
|
+
* sequences in the future. By providing the stop_sequences parameter, you may
|
|
98
|
+
* include additional strings that will cause the model to stop generating.
|
|
99
|
+
*/
|
|
100
|
+
stop_sequences?: Array<string>;
|
|
97
101
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Whether to incrementally stream the response using server-sent events.
|
|
104
|
+
*
|
|
105
|
+
* See
|
|
106
|
+
* [this guide to SSE events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events)
|
|
107
|
+
* for details.
|
|
108
|
+
*/
|
|
109
|
+
stream?: boolean;
|
|
106
110
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
stream?: false;
|
|
111
|
+
/**
|
|
112
|
+
* Amount of randomness injected into the response.
|
|
113
|
+
*
|
|
114
|
+
* Defaults to 1. Ranges from 0 to 1. Use temp closer to 0 for analytical /
|
|
115
|
+
* multiple choice, and closer to 1 for creative and generative tasks.
|
|
116
|
+
*/
|
|
117
|
+
temperature?: number;
|
|
115
118
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Only sample from the top K options for each subsequent token.
|
|
121
|
+
*
|
|
122
|
+
* Used to remove "long tail" low probability responses.
|
|
123
|
+
* [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
|
|
124
|
+
*/
|
|
125
|
+
top_k?: number;
|
|
123
126
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Use nucleus sampling.
|
|
129
|
+
*
|
|
130
|
+
* In nucleus sampling, we compute the cumulative distribution over all the options
|
|
131
|
+
* for each subsequent token in decreasing probability order and cut it off once it
|
|
132
|
+
* reaches a particular probability specified by `top_p`. You should either alter
|
|
133
|
+
* `temperature` or `top_p`, but not both.
|
|
134
|
+
*/
|
|
135
|
+
top_p?: number;
|
|
136
|
+
}
|
|
131
137
|
|
|
138
|
+
export namespace CompletionCreateParams {
|
|
139
|
+
/**
|
|
140
|
+
* An object describing metadata about the request.
|
|
141
|
+
*/
|
|
142
|
+
export interface Metadata {
|
|
132
143
|
/**
|
|
133
|
-
*
|
|
144
|
+
* An external identifier for the user who is associated with the request.
|
|
134
145
|
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
* `temperature` or `top_p`, but not both.
|
|
139
|
-
*/
|
|
140
|
-
top_p?: number;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export namespace CompletionRequestNonStreaming {
|
|
144
|
-
/**
|
|
145
|
-
* An object describing metadata about the request.
|
|
146
|
+
* This should be a uuid, hash value, or other opaque identifier. Anthropic may use
|
|
147
|
+
* this id to help detect abuse. Do not include any identifying information such as
|
|
148
|
+
* name, email address, or phone number.
|
|
146
149
|
*/
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* An external identifier for the user who is associated with the request.
|
|
150
|
-
*
|
|
151
|
-
* This should be a uuid, hash value, or other opaque identifier. Anthropic may use
|
|
152
|
-
* this id to help detect abuse. Do not include any identifying information such as
|
|
153
|
-
* name, email address, or phone number.
|
|
154
|
-
*/
|
|
155
|
-
user_id?: string;
|
|
156
|
-
}
|
|
150
|
+
user_id?: string;
|
|
157
151
|
}
|
|
158
152
|
|
|
159
|
-
export
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
*
|
|
163
|
-
* Note that our models may stop _before_ reaching this maximum. This parameter
|
|
164
|
-
* only specifies the absolute maximum number of tokens to generate.
|
|
165
|
-
*/
|
|
166
|
-
max_tokens_to_sample: number;
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* The model that will complete your prompt.
|
|
170
|
-
*
|
|
171
|
-
* As we improve Claude, we develop new versions of it that you can query. This
|
|
172
|
-
* parameter controls which version of Claude answers your request. Right now we
|
|
173
|
-
* are offering two model families: Claude, and Claude Instant. You can use them by
|
|
174
|
-
* setting `model` to `"claude-2"` or `"claude-instant-1"`, respectively. See
|
|
175
|
-
* [models](https://docs.anthropic.com/claude/reference/selecting-a-model) for
|
|
176
|
-
* additional details.
|
|
177
|
-
*/
|
|
178
|
-
model: (string & {}) | 'claude-2' | 'claude-instant-1';
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* The prompt that you want Claude to complete.
|
|
182
|
-
*
|
|
183
|
-
* For proper response generation you will need to format your prompt as follows:
|
|
184
|
-
*
|
|
185
|
-
* ```javascript
|
|
186
|
-
* const userQuestion = r"Why is the sky blue?";
|
|
187
|
-
* const prompt = `\n\nHuman: ${userQuestion}\n\nAssistant:`;
|
|
188
|
-
* ```
|
|
189
|
-
*
|
|
190
|
-
* See our
|
|
191
|
-
* [comments on prompts](https://docs.anthropic.com/claude/docs/introduction-to-prompt-design)
|
|
192
|
-
* for more context.
|
|
193
|
-
*/
|
|
194
|
-
prompt: string;
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Whether to incrementally stream the response using server-sent events.
|
|
198
|
-
*
|
|
199
|
-
* See
|
|
200
|
-
* [this guide to SSE events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events)
|
|
201
|
-
* for details.
|
|
202
|
-
*/
|
|
203
|
-
stream: true;
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* An object describing metadata about the request.
|
|
207
|
-
*/
|
|
208
|
-
metadata?: CompletionCreateParams.CompletionRequestStreaming.Metadata;
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Sequences that will cause the model to stop generating completion text.
|
|
212
|
-
*
|
|
213
|
-
* Our models stop on `"\n\nHuman:"`, and may include additional built-in stop
|
|
214
|
-
* sequences in the future. By providing the stop_sequences parameter, you may
|
|
215
|
-
* include additional strings that will cause the model to stop generating.
|
|
216
|
-
*/
|
|
217
|
-
stop_sequences?: Array<string>;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Amount of randomness injected into the response.
|
|
221
|
-
*
|
|
222
|
-
* Defaults to 1. Ranges from 0 to 1. Use temp closer to 0 for analytical /
|
|
223
|
-
* multiple choice, and closer to 1 for creative and generative tasks.
|
|
224
|
-
*/
|
|
225
|
-
temperature?: number;
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Only sample from the top K options for each subsequent token.
|
|
229
|
-
*
|
|
230
|
-
* Used to remove "long tail" low probability responses.
|
|
231
|
-
* [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
|
|
232
|
-
*/
|
|
233
|
-
top_k?: number;
|
|
153
|
+
export type CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming;
|
|
154
|
+
export type CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming;
|
|
155
|
+
}
|
|
234
156
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
157
|
+
export interface CompletionCreateParamsNonStreaming extends CompletionCreateParams {
|
|
158
|
+
/**
|
|
159
|
+
* Whether to incrementally stream the response using server-sent events.
|
|
160
|
+
*
|
|
161
|
+
* See
|
|
162
|
+
* [this guide to SSE events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events)
|
|
163
|
+
* for details.
|
|
164
|
+
*/
|
|
165
|
+
stream?: false;
|
|
166
|
+
}
|
|
245
167
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
* this id to help detect abuse. Do not include any identifying information such as
|
|
256
|
-
* name, email address, or phone number.
|
|
257
|
-
*/
|
|
258
|
-
user_id?: string;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
168
|
+
export interface CompletionCreateParamsStreaming extends CompletionCreateParams {
|
|
169
|
+
/**
|
|
170
|
+
* Whether to incrementally stream the response using server-sent events.
|
|
171
|
+
*
|
|
172
|
+
* See
|
|
173
|
+
* [this guide to SSE events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events)
|
|
174
|
+
* for details.
|
|
175
|
+
*/
|
|
176
|
+
stream: true;
|
|
261
177
|
}
|
|
262
178
|
|
|
263
179
|
export namespace Completions {
|
|
264
180
|
export import Completion = API.Completion;
|
|
265
181
|
export import CompletionCreateParams = API.CompletionCreateParams;
|
|
182
|
+
export import CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming;
|
|
183
|
+
export import CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming;
|
|
266
184
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
3
|
export {} from './top-level';
|
|
4
|
-
export {
|
|
4
|
+
export {
|
|
5
|
+
Completion,
|
|
6
|
+
CompletionCreateParams,
|
|
7
|
+
CompletionCreateParamsNonStreaming,
|
|
8
|
+
CompletionCreateParamsStreaming,
|
|
9
|
+
Completions,
|
|
10
|
+
} from './completions';
|
package/src/streaming.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { Response } from './_shims/fetch.js';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { safeJSON } from './core';
|
|
3
|
+
import { safeJSON, createResponseHeaders } from './core';
|
|
6
4
|
import { APIError } from './error';
|
|
7
5
|
|
|
8
6
|
type Bytes = string | ArrayBuffer | Uint8Array | Buffer | null | undefined;
|
|
@@ -13,20 +11,11 @@ type ServerSentEvent = {
|
|
|
13
11
|
raw: string[];
|
|
14
12
|
};
|
|
15
13
|
|
|
16
|
-
export class Stream<Item> implements AsyncIterable<Item
|
|
17
|
-
/** @deprecated - please use the async iterator instead. We plan to add additional helper methods shortly. */
|
|
18
|
-
response: Response;
|
|
19
|
-
/** @deprecated - we plan to add a different way to access raw response information shortly. */
|
|
20
|
-
responseHeaders: Headers;
|
|
21
|
-
controller: AbortController;
|
|
22
|
-
|
|
14
|
+
export class Stream<Item> implements AsyncIterable<Item> {
|
|
23
15
|
private decoder: SSEDecoder;
|
|
24
16
|
|
|
25
|
-
constructor(response: Response, controller: AbortController) {
|
|
26
|
-
this.response = response;
|
|
27
|
-
this.controller = controller;
|
|
17
|
+
constructor(private response: Response, private controller: AbortController) {
|
|
28
18
|
this.decoder = new SSEDecoder();
|
|
29
|
-
this.responseHeaders = createResponseHeaders(response.headers);
|
|
30
19
|
}
|
|
31
20
|
|
|
32
21
|
private async *iterMessages(): AsyncGenerator<ServerSentEvent, void, unknown> {
|
|
@@ -73,7 +62,12 @@ export class Stream<Item> implements AsyncIterable<Item>, APIResponse<Stream<Ite
|
|
|
73
62
|
const errJSON = safeJSON(errText);
|
|
74
63
|
const errMessage = errJSON ? undefined : errText;
|
|
75
64
|
|
|
76
|
-
throw APIError.generate(
|
|
65
|
+
throw APIError.generate(
|
|
66
|
+
undefined,
|
|
67
|
+
errJSON,
|
|
68
|
+
errMessage,
|
|
69
|
+
createResponseHeaders(this.response.headers),
|
|
70
|
+
);
|
|
77
71
|
}
|
|
78
72
|
}
|
|
79
73
|
done = true;
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.6.0'; // x-release-please-version
|
package/streaming.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type { Response } from '@anthropic-ai/sdk/_shims/fetch';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
response: Response;
|
|
6
|
-
/** @deprecated - we plan to add a different way to access raw response information shortly. */
|
|
7
|
-
responseHeaders: Headers;
|
|
8
|
-
controller: AbortController;
|
|
2
|
+
export declare class Stream<Item> implements AsyncIterable<Item> {
|
|
3
|
+
private response;
|
|
4
|
+
private controller;
|
|
9
5
|
private decoder;
|
|
10
6
|
constructor(response: Response, controller: AbortController);
|
|
11
7
|
private iterMessages;
|
package/streaming.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAa/D,qBAAa,MAAM,CAAC,IAAI,CAAE,YAAW,aAAa,CAAC,IAAI,CAAC;IAG1C,OAAO,CAAC,QAAQ;IAAY,OAAO,CAAC,UAAU;IAF1D,OAAO,CAAC,OAAO,CAAa;gBAER,QAAQ,EAAE,QAAQ,EAAU,UAAU,EAAE,eAAe;YAI5D,YAAY;IAqBpB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,CAAC;CAyCrE"}
|
package/streaming.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.Stream = void 0;
|
|
4
|
-
const core_1 = require('
|
|
5
|
-
const core_2 = require('@anthropic-ai/sdk/core');
|
|
4
|
+
const core_1 = require('@anthropic-ai/sdk/core');
|
|
6
5
|
const error_1 = require('@anthropic-ai/sdk/error');
|
|
7
6
|
class Stream {
|
|
8
7
|
constructor(response, controller) {
|
|
9
8
|
this.response = response;
|
|
10
9
|
this.controller = controller;
|
|
11
10
|
this.decoder = new SSEDecoder();
|
|
12
|
-
this.responseHeaders = (0, core_1.createResponseHeaders)(response.headers);
|
|
13
11
|
}
|
|
14
12
|
async *iterMessages() {
|
|
15
13
|
if (!this.response.body) {
|
|
@@ -47,9 +45,14 @@ class Stream {
|
|
|
47
45
|
}
|
|
48
46
|
if (sse.event === 'error') {
|
|
49
47
|
const errText = sse.data;
|
|
50
|
-
const errJSON = (0,
|
|
48
|
+
const errJSON = (0, core_1.safeJSON)(errText);
|
|
51
49
|
const errMessage = errJSON ? undefined : errText;
|
|
52
|
-
throw error_1.APIError.generate(
|
|
50
|
+
throw error_1.APIError.generate(
|
|
51
|
+
undefined,
|
|
52
|
+
errJSON,
|
|
53
|
+
errMessage,
|
|
54
|
+
(0, core_1.createResponseHeaders)(this.response.headers),
|
|
55
|
+
);
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
done = true;
|
package/streaming.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streaming.js","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"streaming.js","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":";;;AAEA,iDAAyE;AACzE,mDAAmD;AAUnD,MAAa,MAAM;IAGjB,YAAoB,QAAkB,EAAU,UAA2B;QAAvD,aAAQ,GAAR,QAAQ,CAAU;QAAU,eAAU,GAAV,UAAU,CAAiB;QACzE,IAAI,CAAC,OAAO,GAAG,IAAI,UAAU,EAAE,CAAC;IAClC,CAAC;IAEO,KAAK,CAAC,CAAC,YAAY;QACzB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;YACvB,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;SACtE;QACD,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QAEtC,MAAM,IAAI,GAAG,2BAA2B,CAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpE,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,IAAI,EAAE;YAC9B,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;gBAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBACtC,IAAI,GAAG;oBAAE,MAAM,GAAG,CAAC;aACpB;SACF;QAED,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,KAAK,EAAE,EAAE;YACtC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACtC,IAAI,GAAG;gBAAE,MAAM,GAAG,CAAC;SACpB;IACH,CAAC;IAED,KAAK,CAAC,CAAC,CAAC,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KAAK,CAAC,IAAI;YACR,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;gBACnC,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI;oBAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,0CAA0C;gBAClF,OAAO,MAAM,CAAC;aACf;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,2CAA2C;gBACjE,MAAM,CAAC,CAAC;aACT;QACH,CAAC;QACD,KAAK,CAAC,MAAM;YACV,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;YACtC,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,aAAa,CAAC;YACpB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/streaming.mjs
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { createResponseHeaders } from '
|
|
2
|
-
import { safeJSON } from '@anthropic-ai/sdk/core';
|
|
1
|
+
import { safeJSON, createResponseHeaders } from '@anthropic-ai/sdk/core';
|
|
3
2
|
import { APIError } from '@anthropic-ai/sdk/error';
|
|
4
3
|
export class Stream {
|
|
5
4
|
constructor(response, controller) {
|
|
6
5
|
this.response = response;
|
|
7
6
|
this.controller = controller;
|
|
8
7
|
this.decoder = new SSEDecoder();
|
|
9
|
-
this.responseHeaders = createResponseHeaders(response.headers);
|
|
10
8
|
}
|
|
11
9
|
async *iterMessages() {
|
|
12
10
|
if (!this.response.body) {
|
|
@@ -46,7 +44,12 @@ export class Stream {
|
|
|
46
44
|
const errText = sse.data;
|
|
47
45
|
const errJSON = safeJSON(errText);
|
|
48
46
|
const errMessage = errJSON ? undefined : errText;
|
|
49
|
-
throw APIError.generate(
|
|
47
|
+
throw APIError.generate(
|
|
48
|
+
undefined,
|
|
49
|
+
errJSON,
|
|
50
|
+
errMessage,
|
|
51
|
+
createResponseHeaders(this.response.headers),
|
|
52
|
+
);
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
55
|
done = true;
|
package/streaming.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streaming.mjs","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":"OAEO,
|
|
1
|
+
{"version":3,"file":"streaming.mjs","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,wBAAwB;OACjE,EAAE,QAAQ,EAAE,MAAM,yBAAyB;AAUlD,MAAM,OAAO,MAAM;IAGjB,YAAoB,QAAkB,EAAU,UAA2B;QAAvD,aAAQ,GAAR,QAAQ,CAAU;QAAU,eAAU,GAAV,UAAU,CAAiB;QACzE,IAAI,CAAC,OAAO,GAAG,IAAI,UAAU,EAAE,CAAC;IAClC,CAAC;IAEO,KAAK,CAAC,CAAC,YAAY;QACzB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;YACvB,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;SACtE;QACD,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QAEtC,MAAM,IAAI,GAAG,2BAA2B,CAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpE,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,IAAI,EAAE;YAC9B,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;gBAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBACtC,IAAI,GAAG;oBAAE,M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EAAE,EAAE,CAAC,CAAC;AACvB,CAAC;AAED;;;;;GAKG;AACH,SAAS,2BAA2B,CAAI,MAAW;IACjD,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;QAAE,OAAO,MAAM,CAAC;IAEhD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,OAAO;QACL,KAAK,CAAC,IAAI;YACR,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;gBACnC,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI;oBAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,0CAA0C;gBAClF,OAAO,MAAM,CAAC;aACf;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,2CAA2C;gBACjE,MAAM,CAAC,CAAC;aACT;QACH,CAAC;QACD,KAAK,CAAC,MAAM;YACV,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;YACtC,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,aAAa,CAAC;YACpB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = '0.
|
|
1
|
+
export declare const VERSION = '0.6.0';
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.6.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
|