@meistrari/tela-sdk-js 0.0.1 → 0.0.3

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/dist/file.d.ts CHANGED
@@ -17,6 +17,10 @@ export type TelaFileOptions = {
17
17
  * ```
18
18
  */
19
19
  range?: [number, number];
20
+ /**
21
+ * Defines the parser provider to be used for the file.
22
+ */
23
+ parserType?: string;
20
24
  };
21
25
  /**
22
26
  * Represents the possible types for a file input,
@@ -120,4 +124,4 @@ export declare class TelaFile {
120
124
  * @param file - The file input to create a `TelaFile` instance from.
121
125
  * @returns A new `TelaFile` instance.
122
126
  */
123
- export declare function createTelaFile(file: TelaFileInput): TelaFile;
127
+ export declare function createTelaFile(file: TelaFileInput, options?: TelaFileOptions): TelaFile;
package/dist/file.js CHANGED
@@ -156,6 +156,6 @@ export class TelaFile {
156
156
  * @param file - The file input to create a `TelaFile` instance from.
157
157
  * @returns A new `TelaFile` instance.
158
158
  */
159
- export function createTelaFile(file) {
160
- return new TelaFile(file);
159
+ export function createTelaFile(file, options) {
160
+ return new TelaFile(file, options);
161
161
  }
@@ -56,8 +56,8 @@ export declare class ChatCompletions extends Resource {
56
56
  */
57
57
  create<Variables = ChatCompletionVariables, CompletionContent = string>(body: ChatCompletionCreateWebhookParams<Variables>, opts?: RequestOptions<ChatCompletionCreateParams<Variables>>): Promise<ChatCompletionWebhookResponse<CompletionContent>>;
58
58
  create<Variables = ChatCompletionVariables, CompletionContent = string>(body: CompletionCreateParamsNonStreaming<Variables>, opts?: RequestOptions<ChatCompletionCreateParams<Variables>>): Promise<ChatCompletionCreateResponse<CompletionContent>>;
59
- create<Variables = ChatCompletionVariables, CompletionContent = string>(body: CompletionCreateParamsStreaming<Variables>, opts?: RequestOptions<ChatCompletionCreateParams<Variables>>): Promise<Stream<ChatCompletionCreateResponse<CompletionContent>>>;
60
- create<Variables = ChatCompletionVariables, CompletionContent = string>(body: ChatCompletionCreateParamsBase<Variables>, opts?: RequestOptions<ChatCompletionCreateParams<Variables>>): Promise<Stream<ChatCompletionCreateResponse<CompletionContent>> | ChatCompletionCreateResponse<CompletionContent> | ChatCompletionWebhookResponse<CompletionContent>>;
59
+ create<Variables = ChatCompletionVariables, CompletionContent = string>(body: CompletionCreateParamsStreaming<Variables>, opts?: RequestOptions<ChatCompletionCreateParams<Variables>>): Promise<Stream<ChatCompletionCreateStreamingResponse<CompletionContent>>>;
60
+ create<Variables = ChatCompletionVariables, CompletionContent = string>(body: ChatCompletionCreateParamsBase<Variables>, opts?: RequestOptions<ChatCompletionCreateParams<Variables>>): Promise<Stream<ChatCompletionCreateStreamingResponse<CompletionContent>> | ChatCompletionCreateResponse<CompletionContent> | ChatCompletionWebhookResponse<CompletionContent>>;
61
61
  /**
62
62
  * Uploads a file and returns its URL and options.
63
63
  *
@@ -242,6 +242,59 @@ export type ChatCompletionCreateResponse<T> = {
242
242
  };
243
243
  }>;
244
244
  };
245
+ /**
246
+ * Response structure for a chat completion streaming response.
247
+ */
248
+ export type ChatCompletionCreateStreamingResponse<T> = {
249
+ /**
250
+ * The ID of the completion.
251
+ */
252
+ id: string;
253
+ /**
254
+ * The object of the completion.
255
+ */
256
+ object: string;
257
+ /**
258
+ * The created time of the completion.
259
+ */
260
+ created: number;
261
+ /**
262
+ * The model of the completion.
263
+ */
264
+ model: string;
265
+ /**
266
+ * The choices of the completion.
267
+ */
268
+ choices: Array<{
269
+ delta: {
270
+ role: string | null;
271
+ content: string | null;
272
+ functionCall: {
273
+ name: string | null;
274
+ arguments: string | null;
275
+ } | null;
276
+ };
277
+ finishReason: string | null;
278
+ index: number;
279
+ logprobs: number | null;
280
+ }>;
281
+ /**
282
+ * The message of the completion.
283
+ */
284
+ message: {
285
+ role: string;
286
+ content: string | null;
287
+ functionCall: {
288
+ name: string | null;
289
+ arguments: string | null;
290
+ } | null;
291
+ toolCalls: Array<{
292
+ name: string;
293
+ arguments: string;
294
+ }>;
295
+ structuredContent: T;
296
+ };
297
+ };
245
298
  /**
246
299
  * Response structure for a chat completion webhook.
247
300
  * This interface represents the data sent to the webhook URL when a chat completion is finished.
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "@meistrari/tela-sdk-js",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/meistrari/tela-sdk-js.git"
8
+ },
5
9
  "exports": {
6
10
  ".": "./dist/index.js"
7
11
  },