@effect/ai-openai 0.11.0 → 0.11.2
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/OpenAiEmbeddings/package.json +6 -0
- package/OpenAiTelemetry/package.json +6 -0
- package/dist/cjs/Generated.js +1910 -316
- package/dist/cjs/Generated.js.map +1 -1
- package/dist/cjs/OpenAiClient.js +88 -60
- package/dist/cjs/OpenAiClient.js.map +1 -1
- package/dist/cjs/OpenAiCompletions.js +82 -6
- package/dist/cjs/OpenAiCompletions.js.map +1 -1
- package/dist/cjs/OpenAiEmbeddings.js +95 -0
- package/dist/cjs/OpenAiEmbeddings.js.map +1 -0
- package/dist/cjs/OpenAiTelemetry.js +39 -0
- package/dist/cjs/OpenAiTelemetry.js.map +1 -0
- package/dist/cjs/index.js +5 -1
- package/dist/dts/Generated.d.ts +2789 -517
- package/dist/dts/Generated.d.ts.map +1 -1
- package/dist/dts/OpenAiClient.d.ts +15 -1
- package/dist/dts/OpenAiClient.d.ts.map +1 -1
- package/dist/dts/OpenAiCompletions.d.ts +8 -2
- package/dist/dts/OpenAiCompletions.d.ts.map +1 -1
- package/dist/dts/OpenAiConfig.d.ts +12 -1
- package/dist/dts/OpenAiConfig.d.ts.map +1 -1
- package/dist/dts/OpenAiEmbeddings.d.ts +51 -0
- package/dist/dts/OpenAiEmbeddings.d.ts.map +1 -0
- package/dist/dts/OpenAiTelemetry.d.ts +107 -0
- package/dist/dts/OpenAiTelemetry.d.ts.map +1 -0
- package/dist/dts/index.d.ts +8 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/esm/Generated.js +1612 -311
- package/dist/esm/Generated.js.map +1 -1
- package/dist/esm/OpenAiClient.js +88 -60
- package/dist/esm/OpenAiClient.js.map +1 -1
- package/dist/esm/OpenAiCompletions.js +82 -6
- package/dist/esm/OpenAiCompletions.js.map +1 -1
- package/dist/esm/OpenAiEmbeddings.js +83 -0
- package/dist/esm/OpenAiEmbeddings.js.map +1 -0
- package/dist/esm/OpenAiTelemetry.js +30 -0
- package/dist/esm/OpenAiTelemetry.js.map +1 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +22 -6
- package/src/Generated.ts +1892 -398
- package/src/OpenAiClient.ts +118 -67
- package/src/OpenAiCompletions.ts +108 -14
- package/src/OpenAiEmbeddings.ts +149 -0
- package/src/OpenAiTelemetry.ts +159 -0
- package/src/index.ts +10 -0
package/dist/esm/Generated.js
CHANGED
|
@@ -3,12 +3,13 @@ import * as HttpClientRequest from "@effect/platform/HttpClientRequest";
|
|
|
3
3
|
import * as HttpClientResponse from "@effect/platform/HttpClientResponse";
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
5
|
import * as S from "effect/Schema";
|
|
6
|
+
export class ListAssistantsParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
6
7
|
export class ListAssistantsParams extends /*#__PURE__*/S.Struct({
|
|
7
8
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
8
9
|
nullable: true,
|
|
9
10
|
default: () => 20
|
|
10
11
|
}),
|
|
11
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
12
|
+
"order": /*#__PURE__*/S.optionalWith(ListAssistantsParamsOrder, {
|
|
12
13
|
nullable: true,
|
|
13
14
|
default: () => "desc"
|
|
14
15
|
}),
|
|
@@ -19,17 +20,21 @@ export class ListAssistantsParams extends /*#__PURE__*/S.Struct({
|
|
|
19
20
|
nullable: true
|
|
20
21
|
})
|
|
21
22
|
}) {}
|
|
23
|
+
export class AssistantObjectObject extends /*#__PURE__*/S.Literal("assistant") {}
|
|
24
|
+
export class AssistantToolsCodeType extends /*#__PURE__*/S.Literal("code_interpreter") {}
|
|
22
25
|
export class AssistantToolsCode extends /*#__PURE__*/S.Struct({
|
|
23
|
-
"type":
|
|
26
|
+
"type": AssistantToolsCodeType
|
|
24
27
|
}) {}
|
|
28
|
+
export class AssistantToolsFileSearchType extends /*#__PURE__*/S.Literal("file_search") {}
|
|
29
|
+
export class FileSearchRankingOptionsRanker extends /*#__PURE__*/S.Literal("auto", "default_2024_08_21") {}
|
|
25
30
|
export class FileSearchRankingOptions extends /*#__PURE__*/S.Struct({
|
|
26
|
-
"ranker": /*#__PURE__*/S.optionalWith(
|
|
31
|
+
"ranker": /*#__PURE__*/S.optionalWith(FileSearchRankingOptionsRanker, {
|
|
27
32
|
nullable: true
|
|
28
33
|
}),
|
|
29
34
|
"score_threshold": /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1))
|
|
30
35
|
}) {}
|
|
31
36
|
export class AssistantToolsFileSearch extends /*#__PURE__*/S.Struct({
|
|
32
|
-
"type":
|
|
37
|
+
"type": AssistantToolsFileSearchType,
|
|
33
38
|
"file_search": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
34
39
|
"max_num_results": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(50)), {
|
|
35
40
|
nullable: true
|
|
@@ -41,6 +46,7 @@ export class AssistantToolsFileSearch extends /*#__PURE__*/S.Struct({
|
|
|
41
46
|
nullable: true
|
|
42
47
|
})
|
|
43
48
|
}) {}
|
|
49
|
+
export class AssistantToolsFunctionType extends /*#__PURE__*/S.Literal("function") {}
|
|
44
50
|
export class FunctionParameters extends /*#__PURE__*/S.Record({
|
|
45
51
|
key: S.String,
|
|
46
52
|
value: S.Unknown
|
|
@@ -59,21 +65,24 @@ export class FunctionObject extends /*#__PURE__*/S.Struct({
|
|
|
59
65
|
})
|
|
60
66
|
}) {}
|
|
61
67
|
export class AssistantToolsFunction extends /*#__PURE__*/S.Struct({
|
|
62
|
-
"type":
|
|
68
|
+
"type": AssistantToolsFunctionType,
|
|
63
69
|
"function": FunctionObject
|
|
64
70
|
}) {}
|
|
71
|
+
export class ResponseFormatTextType extends /*#__PURE__*/S.Literal("text") {}
|
|
65
72
|
export class ResponseFormatText extends /*#__PURE__*/S.Struct({
|
|
66
|
-
"type":
|
|
73
|
+
"type": ResponseFormatTextType
|
|
67
74
|
}) {}
|
|
75
|
+
export class ResponseFormatJsonObjectType extends /*#__PURE__*/S.Literal("json_object") {}
|
|
68
76
|
export class ResponseFormatJsonObject extends /*#__PURE__*/S.Struct({
|
|
69
|
-
"type":
|
|
77
|
+
"type": ResponseFormatJsonObjectType
|
|
70
78
|
}) {}
|
|
79
|
+
export class ResponseFormatJsonSchemaType extends /*#__PURE__*/S.Literal("json_schema") {}
|
|
71
80
|
export class ResponseFormatJsonSchemaSchema extends /*#__PURE__*/S.Record({
|
|
72
81
|
key: S.String,
|
|
73
82
|
value: S.Unknown
|
|
74
83
|
}) {}
|
|
75
84
|
export class ResponseFormatJsonSchema extends /*#__PURE__*/S.Struct({
|
|
76
|
-
"type":
|
|
85
|
+
"type": ResponseFormatJsonSchemaType,
|
|
77
86
|
"json_schema": /*#__PURE__*/S.Struct({
|
|
78
87
|
"description": /*#__PURE__*/S.optionalWith(S.String, {
|
|
79
88
|
nullable: true
|
|
@@ -91,7 +100,7 @@ export class ResponseFormatJsonSchema extends /*#__PURE__*/S.Struct({
|
|
|
91
100
|
export class AssistantsApiResponseFormatOption extends /*#__PURE__*/S.Union( /*#__PURE__*/S.Literal("auto"), ResponseFormatText, ResponseFormatJsonObject, ResponseFormatJsonSchema) {}
|
|
92
101
|
export class AssistantObject extends /*#__PURE__*/S.Struct({
|
|
93
102
|
"id": S.String,
|
|
94
|
-
"object":
|
|
103
|
+
"object": AssistantObjectObject,
|
|
95
104
|
"created_at": S.Int,
|
|
96
105
|
"name": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.String.pipe( /*#__PURE__*/S.maxLength(256))),
|
|
97
106
|
"description": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.String.pipe( /*#__PURE__*/S.maxLength(512))),
|
|
@@ -140,8 +149,10 @@ export class ListAssistantsResponse extends /*#__PURE__*/S.Class("ListAssistants
|
|
|
140
149
|
"last_id": S.String,
|
|
141
150
|
"has_more": S.Boolean
|
|
142
151
|
}) {}
|
|
152
|
+
export class CreateAssistantRequestModel extends /*#__PURE__*/S.Literal("gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-turbo-preview", "gpt-4-1106-preview", "gpt-4-vision-preview", "gpt-4", "gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613") {}
|
|
153
|
+
export class CreateAssistantRequestToolResourcesFileSearchVectorStoresChunkingStrategyType extends /*#__PURE__*/S.Literal("static") {}
|
|
143
154
|
export class CreateAssistantRequest extends /*#__PURE__*/S.Class("CreateAssistantRequest")({
|
|
144
|
-
"model": /*#__PURE__*/S.Union(S.String,
|
|
155
|
+
"model": /*#__PURE__*/S.Union(S.String, CreateAssistantRequestModel),
|
|
145
156
|
"name": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.String.pipe( /*#__PURE__*/S.maxLength(256)), {
|
|
146
157
|
nullable: true
|
|
147
158
|
}),
|
|
@@ -265,16 +276,20 @@ export class ModifyAssistantRequest extends /*#__PURE__*/S.Class("ModifyAssistan
|
|
|
265
276
|
nullable: true
|
|
266
277
|
})
|
|
267
278
|
}) {}
|
|
279
|
+
export class DeleteAssistantResponseObject extends /*#__PURE__*/S.Literal("assistant.deleted") {}
|
|
268
280
|
export class DeleteAssistantResponse extends /*#__PURE__*/S.Class("DeleteAssistantResponse")({
|
|
269
281
|
"id": S.String,
|
|
270
282
|
"deleted": S.Boolean,
|
|
271
|
-
"object":
|
|
283
|
+
"object": DeleteAssistantResponseObject
|
|
272
284
|
}) {}
|
|
285
|
+
export class CreateSpeechRequestModel extends /*#__PURE__*/S.Literal("tts-1", "tts-1-hd") {}
|
|
286
|
+
export class CreateSpeechRequestVoice extends /*#__PURE__*/S.Literal("alloy", "ash", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer") {}
|
|
287
|
+
export class CreateSpeechRequestResponseFormat extends /*#__PURE__*/S.Literal("mp3", "opus", "aac", "flac", "wav", "pcm") {}
|
|
273
288
|
export class CreateSpeechRequest extends /*#__PURE__*/S.Class("CreateSpeechRequest")({
|
|
274
|
-
"model": /*#__PURE__*/S.Union(S.String,
|
|
289
|
+
"model": /*#__PURE__*/S.Union(S.String, CreateSpeechRequestModel),
|
|
275
290
|
"input": /*#__PURE__*/S.String.pipe( /*#__PURE__*/S.maxLength(4096)),
|
|
276
|
-
"voice":
|
|
277
|
-
"response_format": /*#__PURE__*/S.optionalWith(
|
|
291
|
+
"voice": CreateSpeechRequestVoice,
|
|
292
|
+
"response_format": /*#__PURE__*/S.optionalWith(CreateSpeechRequestResponseFormat, {
|
|
278
293
|
nullable: true,
|
|
279
294
|
default: () => "mp3"
|
|
280
295
|
}),
|
|
@@ -336,9 +351,11 @@ export class ListBatchesParams extends /*#__PURE__*/S.Struct({
|
|
|
336
351
|
default: () => 20
|
|
337
352
|
})
|
|
338
353
|
}) {}
|
|
354
|
+
export class BatchObject extends /*#__PURE__*/S.Literal("batch") {}
|
|
355
|
+
export class BatchStatus extends /*#__PURE__*/S.Literal("validating", "failed", "in_progress", "finalizing", "completed", "expired", "cancelling", "cancelled") {}
|
|
339
356
|
export class Batch extends /*#__PURE__*/S.Struct({
|
|
340
357
|
"id": S.String,
|
|
341
|
-
"object":
|
|
358
|
+
"object": BatchObject,
|
|
342
359
|
"endpoint": S.String,
|
|
343
360
|
"errors": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
344
361
|
"object": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -365,7 +382,7 @@ export class Batch extends /*#__PURE__*/S.Struct({
|
|
|
365
382
|
}),
|
|
366
383
|
"input_file_id": S.String,
|
|
367
384
|
"completion_window": S.String,
|
|
368
|
-
"status":
|
|
385
|
+
"status": BatchStatus,
|
|
369
386
|
"output_file_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
370
387
|
nullable: true
|
|
371
388
|
}),
|
|
@@ -411,6 +428,7 @@ export class Batch extends /*#__PURE__*/S.Struct({
|
|
|
411
428
|
nullable: true
|
|
412
429
|
})
|
|
413
430
|
}) {}
|
|
431
|
+
export class ListBatchesResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
414
432
|
export class ListBatchesResponse extends /*#__PURE__*/S.Class("ListBatchesResponse")({
|
|
415
433
|
"data": /*#__PURE__*/S.Array(Batch),
|
|
416
434
|
"first_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -420,12 +438,14 @@ export class ListBatchesResponse extends /*#__PURE__*/S.Class("ListBatchesRespon
|
|
|
420
438
|
nullable: true
|
|
421
439
|
}),
|
|
422
440
|
"has_more": S.Boolean,
|
|
423
|
-
"object":
|
|
441
|
+
"object": ListBatchesResponseObject
|
|
424
442
|
}) {}
|
|
443
|
+
export class CreateBatchRequestEndpoint extends /*#__PURE__*/S.Literal("/v1/chat/completions", "/v1/embeddings", "/v1/completions") {}
|
|
444
|
+
export class CreateBatchRequestCompletionWindow extends /*#__PURE__*/S.Literal("24h") {}
|
|
425
445
|
export class CreateBatchRequest extends /*#__PURE__*/S.Class("CreateBatchRequest")({
|
|
426
446
|
"input_file_id": S.String,
|
|
427
|
-
"endpoint":
|
|
428
|
-
"completion_window":
|
|
447
|
+
"endpoint": CreateBatchRequestEndpoint,
|
|
448
|
+
"completion_window": CreateBatchRequestCompletionWindow,
|
|
429
449
|
"metadata": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Record({
|
|
430
450
|
key: S.String,
|
|
431
451
|
value: S.Unknown
|
|
@@ -433,51 +453,69 @@ export class CreateBatchRequest extends /*#__PURE__*/S.Class("CreateBatchRequest
|
|
|
433
453
|
nullable: true
|
|
434
454
|
})
|
|
435
455
|
}) {}
|
|
456
|
+
export class ChatCompletionRequestMessageContentPartTextType extends /*#__PURE__*/S.Literal("text") {}
|
|
436
457
|
export class ChatCompletionRequestMessageContentPartText extends /*#__PURE__*/S.Struct({
|
|
437
|
-
"type":
|
|
458
|
+
"type": ChatCompletionRequestMessageContentPartTextType,
|
|
438
459
|
"text": S.String
|
|
439
460
|
}) {}
|
|
461
|
+
export class ChatCompletionRequestDeveloperMessageRole extends /*#__PURE__*/S.Literal("developer") {}
|
|
462
|
+
export class ChatCompletionRequestDeveloperMessage extends /*#__PURE__*/S.Struct({
|
|
463
|
+
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.NonEmptyArray(ChatCompletionRequestMessageContentPartText)),
|
|
464
|
+
"role": ChatCompletionRequestDeveloperMessageRole,
|
|
465
|
+
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
466
|
+
nullable: true
|
|
467
|
+
})
|
|
468
|
+
}) {}
|
|
440
469
|
export class ChatCompletionRequestSystemMessageContentPart extends ChatCompletionRequestMessageContentPartText {}
|
|
470
|
+
export class ChatCompletionRequestSystemMessageRole extends /*#__PURE__*/S.Literal("system") {}
|
|
441
471
|
export class ChatCompletionRequestSystemMessage extends /*#__PURE__*/S.Struct({
|
|
442
472
|
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.NonEmptyArray(ChatCompletionRequestSystemMessageContentPart)),
|
|
443
|
-
"role":
|
|
473
|
+
"role": ChatCompletionRequestSystemMessageRole,
|
|
444
474
|
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
445
475
|
nullable: true
|
|
446
476
|
})
|
|
447
477
|
}) {}
|
|
478
|
+
export class ChatCompletionRequestMessageContentPartImageType extends /*#__PURE__*/S.Literal("image_url") {}
|
|
479
|
+
export class ChatCompletionRequestMessageContentPartImageImageUrlDetail extends /*#__PURE__*/S.Literal("auto", "low", "high") {}
|
|
448
480
|
export class ChatCompletionRequestMessageContentPartImage extends /*#__PURE__*/S.Struct({
|
|
449
|
-
"type":
|
|
481
|
+
"type": ChatCompletionRequestMessageContentPartImageType,
|
|
450
482
|
"image_url": /*#__PURE__*/S.Struct({
|
|
451
483
|
"url": S.String,
|
|
452
|
-
"detail": /*#__PURE__*/S.optionalWith(
|
|
484
|
+
"detail": /*#__PURE__*/S.optionalWith(ChatCompletionRequestMessageContentPartImageImageUrlDetail, {
|
|
453
485
|
nullable: true,
|
|
454
486
|
default: () => "auto"
|
|
455
487
|
})
|
|
456
488
|
})
|
|
457
489
|
}) {}
|
|
490
|
+
export class ChatCompletionRequestMessageContentPartAudioType extends /*#__PURE__*/S.Literal("input_audio") {}
|
|
491
|
+
export class ChatCompletionRequestMessageContentPartAudioInputAudioFormat extends /*#__PURE__*/S.Literal("wav", "mp3") {}
|
|
458
492
|
export class ChatCompletionRequestMessageContentPartAudio extends /*#__PURE__*/S.Struct({
|
|
459
|
-
"type":
|
|
493
|
+
"type": ChatCompletionRequestMessageContentPartAudioType,
|
|
460
494
|
"input_audio": /*#__PURE__*/S.Struct({
|
|
461
495
|
"data": S.String,
|
|
462
|
-
"format":
|
|
496
|
+
"format": ChatCompletionRequestMessageContentPartAudioInputAudioFormat
|
|
463
497
|
})
|
|
464
498
|
}) {}
|
|
465
499
|
export class ChatCompletionRequestUserMessageContentPart extends /*#__PURE__*/S.Union(ChatCompletionRequestMessageContentPartText, ChatCompletionRequestMessageContentPartImage, ChatCompletionRequestMessageContentPartAudio) {}
|
|
500
|
+
export class ChatCompletionRequestUserMessageRole extends /*#__PURE__*/S.Literal("user") {}
|
|
466
501
|
export class ChatCompletionRequestUserMessage extends /*#__PURE__*/S.Struct({
|
|
467
502
|
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.NonEmptyArray(ChatCompletionRequestUserMessageContentPart)),
|
|
468
|
-
"role":
|
|
503
|
+
"role": ChatCompletionRequestUserMessageRole,
|
|
469
504
|
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
470
505
|
nullable: true
|
|
471
506
|
})
|
|
472
507
|
}) {}
|
|
508
|
+
export class ChatCompletionRequestMessageContentPartRefusalType extends /*#__PURE__*/S.Literal("refusal") {}
|
|
473
509
|
export class ChatCompletionRequestMessageContentPartRefusal extends /*#__PURE__*/S.Struct({
|
|
474
|
-
"type":
|
|
510
|
+
"type": ChatCompletionRequestMessageContentPartRefusalType,
|
|
475
511
|
"refusal": S.String
|
|
476
512
|
}) {}
|
|
477
513
|
export class ChatCompletionRequestAssistantMessageContentPart extends /*#__PURE__*/S.Union(ChatCompletionRequestMessageContentPartText, ChatCompletionRequestMessageContentPartRefusal) {}
|
|
514
|
+
export class ChatCompletionRequestAssistantMessageRole extends /*#__PURE__*/S.Literal("assistant") {}
|
|
515
|
+
export class ChatCompletionMessageToolCallType extends /*#__PURE__*/S.Literal("function") {}
|
|
478
516
|
export class ChatCompletionMessageToolCall extends /*#__PURE__*/S.Struct({
|
|
479
517
|
"id": S.String,
|
|
480
|
-
"type":
|
|
518
|
+
"type": ChatCompletionMessageToolCallType,
|
|
481
519
|
"function": /*#__PURE__*/S.Struct({
|
|
482
520
|
"name": S.String,
|
|
483
521
|
"arguments": S.String
|
|
@@ -491,7 +529,7 @@ export class ChatCompletionRequestAssistantMessage extends /*#__PURE__*/S.Struct
|
|
|
491
529
|
"refusal": /*#__PURE__*/S.optionalWith(S.String, {
|
|
492
530
|
nullable: true
|
|
493
531
|
}),
|
|
494
|
-
"role":
|
|
532
|
+
"role": ChatCompletionRequestAssistantMessageRole,
|
|
495
533
|
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
496
534
|
nullable: true
|
|
497
535
|
}),
|
|
@@ -510,36 +548,51 @@ export class ChatCompletionRequestAssistantMessage extends /*#__PURE__*/S.Struct
|
|
|
510
548
|
nullable: true
|
|
511
549
|
})
|
|
512
550
|
}) {}
|
|
551
|
+
export class ChatCompletionRequestToolMessageRole extends /*#__PURE__*/S.Literal("tool") {}
|
|
513
552
|
export class ChatCompletionRequestToolMessageContentPart extends ChatCompletionRequestMessageContentPartText {}
|
|
514
553
|
export class ChatCompletionRequestToolMessage extends /*#__PURE__*/S.Struct({
|
|
515
|
-
"role":
|
|
554
|
+
"role": ChatCompletionRequestToolMessageRole,
|
|
516
555
|
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.NonEmptyArray(ChatCompletionRequestToolMessageContentPart)),
|
|
517
556
|
"tool_call_id": S.String
|
|
518
557
|
}) {}
|
|
558
|
+
export class ChatCompletionRequestFunctionMessageRole extends /*#__PURE__*/S.Literal("function") {}
|
|
519
559
|
export class ChatCompletionRequestFunctionMessage extends /*#__PURE__*/S.Struct({
|
|
520
|
-
"role":
|
|
560
|
+
"role": ChatCompletionRequestFunctionMessageRole,
|
|
521
561
|
"content": /*#__PURE__*/S.NullOr(S.String),
|
|
522
562
|
"name": S.String
|
|
523
563
|
}) {}
|
|
524
|
-
export class ChatCompletionRequestMessage extends /*#__PURE__*/S.Union(ChatCompletionRequestSystemMessage, ChatCompletionRequestUserMessage, ChatCompletionRequestAssistantMessage, ChatCompletionRequestToolMessage, ChatCompletionRequestFunctionMessage) {}
|
|
564
|
+
export class ChatCompletionRequestMessage extends /*#__PURE__*/S.Union(ChatCompletionRequestDeveloperMessage, ChatCompletionRequestSystemMessage, ChatCompletionRequestUserMessage, ChatCompletionRequestAssistantMessage, ChatCompletionRequestToolMessage, ChatCompletionRequestFunctionMessage) {}
|
|
565
|
+
export class CreateChatCompletionRequestModel extends /*#__PURE__*/S.Literal("o1", "o1-2024-12-17", "o1-preview", "o1-preview-2024-09-12", "o1-mini", "o1-mini-2024-09-12", "gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-4o-audio-preview", "gpt-4o-audio-preview-2024-10-01", "gpt-4o-audio-preview-2024-12-17", "gpt-4o-mini-audio-preview", "gpt-4o-mini-audio-preview-2024-12-17", "chatgpt-4o-latest", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-turbo-preview", "gpt-4-1106-preview", "gpt-4-vision-preview", "gpt-4", "gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0301", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613") {}
|
|
566
|
+
export class CreateChatCompletionRequestReasoningEffort extends /*#__PURE__*/S.Literal("low", "medium", "high") {}
|
|
525
567
|
export class ChatCompletionModalities extends /*#__PURE__*/S.Array( /*#__PURE__*/S.Literal("text", "audio")) {}
|
|
568
|
+
export class PredictionContentType extends /*#__PURE__*/S.Literal("content") {}
|
|
569
|
+
export class PredictionContent extends /*#__PURE__*/S.Struct({
|
|
570
|
+
"type": PredictionContentType,
|
|
571
|
+
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.NonEmptyArray(ChatCompletionRequestMessageContentPartText))
|
|
572
|
+
}) {}
|
|
573
|
+
export class CreateChatCompletionRequestAudioVoice extends /*#__PURE__*/S.Literal("alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse") {}
|
|
574
|
+
export class CreateChatCompletionRequestAudioFormat extends /*#__PURE__*/S.Literal("wav", "mp3", "flac", "opus", "pcm16") {}
|
|
575
|
+
export class CreateChatCompletionRequestServiceTier extends /*#__PURE__*/S.Literal("auto", "default") {}
|
|
526
576
|
export class ChatCompletionStreamOptions extends /*#__PURE__*/S.Struct({
|
|
527
577
|
"include_usage": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
528
578
|
nullable: true
|
|
529
579
|
})
|
|
530
580
|
}) {}
|
|
581
|
+
export class ChatCompletionToolType extends /*#__PURE__*/S.Literal("function") {}
|
|
531
582
|
export class ChatCompletionTool extends /*#__PURE__*/S.Struct({
|
|
532
|
-
"type":
|
|
583
|
+
"type": ChatCompletionToolType,
|
|
533
584
|
"function": FunctionObject
|
|
534
585
|
}) {}
|
|
586
|
+
export class ChatCompletionNamedToolChoiceType extends /*#__PURE__*/S.Literal("function") {}
|
|
535
587
|
export class ChatCompletionNamedToolChoice extends /*#__PURE__*/S.Struct({
|
|
536
|
-
"type":
|
|
588
|
+
"type": ChatCompletionNamedToolChoiceType,
|
|
537
589
|
"function": /*#__PURE__*/S.Struct({
|
|
538
590
|
"name": S.String
|
|
539
591
|
})
|
|
540
592
|
}) {}
|
|
541
593
|
export class ChatCompletionToolChoiceOption extends /*#__PURE__*/S.Union( /*#__PURE__*/S.Literal("none", "auto", "required"), ChatCompletionNamedToolChoice) {}
|
|
542
594
|
export class ParallelToolCalls extends S.Boolean {}
|
|
595
|
+
export class CreateChatCompletionRequestFunctionCall extends /*#__PURE__*/S.Literal("none", "auto") {}
|
|
543
596
|
export class ChatCompletionFunctionCallOption extends /*#__PURE__*/S.Struct({
|
|
544
597
|
"name": S.String
|
|
545
598
|
}) {}
|
|
@@ -554,11 +607,15 @@ export class ChatCompletionFunctions extends /*#__PURE__*/S.Struct({
|
|
|
554
607
|
}) {}
|
|
555
608
|
export class CreateChatCompletionRequest extends /*#__PURE__*/S.Class("CreateChatCompletionRequest")({
|
|
556
609
|
"messages": /*#__PURE__*/S.NonEmptyArray(ChatCompletionRequestMessage),
|
|
557
|
-
"model": /*#__PURE__*/S.Union(S.String,
|
|
610
|
+
"model": /*#__PURE__*/S.Union(S.String, CreateChatCompletionRequestModel),
|
|
558
611
|
"store": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
559
612
|
nullable: true,
|
|
560
613
|
default: () => false
|
|
561
614
|
}),
|
|
615
|
+
"reasoning_effort": /*#__PURE__*/S.optionalWith(CreateChatCompletionRequestReasoningEffort, {
|
|
616
|
+
nullable: true,
|
|
617
|
+
default: () => "medium"
|
|
618
|
+
}),
|
|
562
619
|
"metadata": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Record({
|
|
563
620
|
key: S.String,
|
|
564
621
|
value: S.Unknown
|
|
@@ -595,9 +652,12 @@ export class CreateChatCompletionRequest extends /*#__PURE__*/S.Class("CreateCha
|
|
|
595
652
|
"modalities": /*#__PURE__*/S.optionalWith(ChatCompletionModalities, {
|
|
596
653
|
nullable: true
|
|
597
654
|
}),
|
|
655
|
+
"prediction": /*#__PURE__*/S.optionalWith(PredictionContent, {
|
|
656
|
+
nullable: true
|
|
657
|
+
}),
|
|
598
658
|
"audio": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
599
|
-
"voice":
|
|
600
|
-
"format":
|
|
659
|
+
"voice": CreateChatCompletionRequestAudioVoice,
|
|
660
|
+
"format": CreateChatCompletionRequestAudioFormat
|
|
601
661
|
}), {
|
|
602
662
|
nullable: true
|
|
603
663
|
}),
|
|
@@ -608,10 +668,10 @@ export class CreateChatCompletionRequest extends /*#__PURE__*/S.Class("CreateCha
|
|
|
608
668
|
"response_format": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(ResponseFormatText, ResponseFormatJsonObject, ResponseFormatJsonSchema), {
|
|
609
669
|
nullable: true
|
|
610
670
|
}),
|
|
611
|
-
"seed": /*#__PURE__*/S.optionalWith(
|
|
671
|
+
"seed": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
612
672
|
nullable: true
|
|
613
673
|
}),
|
|
614
|
-
"service_tier": /*#__PURE__*/S.optionalWith(
|
|
674
|
+
"service_tier": /*#__PURE__*/S.optionalWith(CreateChatCompletionRequestServiceTier, {
|
|
615
675
|
nullable: true,
|
|
616
676
|
default: () => "auto"
|
|
617
677
|
}),
|
|
@@ -646,20 +706,22 @@ export class CreateChatCompletionRequest extends /*#__PURE__*/S.Class("CreateCha
|
|
|
646
706
|
"user": /*#__PURE__*/S.optionalWith(S.String, {
|
|
647
707
|
nullable: true
|
|
648
708
|
}),
|
|
649
|
-
"function_call": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(
|
|
709
|
+
"function_call": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(CreateChatCompletionRequestFunctionCall, ChatCompletionFunctionCallOption), {
|
|
650
710
|
nullable: true
|
|
651
711
|
}),
|
|
652
712
|
"functions": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(ChatCompletionFunctions).pipe( /*#__PURE__*/S.minItems(1), /*#__PURE__*/S.maxItems(128)), {
|
|
653
713
|
nullable: true
|
|
654
714
|
})
|
|
655
715
|
}) {}
|
|
716
|
+
export class CreateChatCompletionResponseChoicesFinishReason extends /*#__PURE__*/S.Literal("stop", "length", "tool_calls", "content_filter", "function_call") {}
|
|
717
|
+
export class ChatCompletionResponseMessageRole extends /*#__PURE__*/S.Literal("assistant") {}
|
|
656
718
|
export class ChatCompletionResponseMessage extends /*#__PURE__*/S.Struct({
|
|
657
719
|
"content": /*#__PURE__*/S.NullOr(S.String),
|
|
658
720
|
"refusal": /*#__PURE__*/S.NullOr(S.String),
|
|
659
721
|
"tool_calls": /*#__PURE__*/S.optionalWith(ChatCompletionMessageToolCalls, {
|
|
660
722
|
nullable: true
|
|
661
723
|
}),
|
|
662
|
-
"role":
|
|
724
|
+
"role": ChatCompletionResponseMessageRole,
|
|
663
725
|
"function_call": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
664
726
|
"arguments": S.String,
|
|
665
727
|
"name": S.String
|
|
@@ -685,16 +747,24 @@ export class ChatCompletionTokenLogprob extends /*#__PURE__*/S.Struct({
|
|
|
685
747
|
"bytes": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Array(S.Int))
|
|
686
748
|
}))
|
|
687
749
|
}) {}
|
|
750
|
+
export class CreateChatCompletionResponseServiceTier extends /*#__PURE__*/S.Literal("scale", "default") {}
|
|
751
|
+
export class CreateChatCompletionResponseObject extends /*#__PURE__*/S.Literal("chat.completion") {}
|
|
688
752
|
export class CompletionUsage extends /*#__PURE__*/S.Struct({
|
|
689
753
|
"completion_tokens": S.Int,
|
|
690
754
|
"prompt_tokens": S.Int,
|
|
691
755
|
"total_tokens": S.Int,
|
|
692
756
|
"completion_tokens_details": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
757
|
+
"accepted_prediction_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
758
|
+
nullable: true
|
|
759
|
+
}),
|
|
693
760
|
"audio_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
694
761
|
nullable: true
|
|
695
762
|
}),
|
|
696
763
|
"reasoning_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
697
764
|
nullable: true
|
|
765
|
+
}),
|
|
766
|
+
"rejected_prediction_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
767
|
+
nullable: true
|
|
698
768
|
})
|
|
699
769
|
}), {
|
|
700
770
|
nullable: true
|
|
@@ -713,7 +783,7 @@ export class CompletionUsage extends /*#__PURE__*/S.Struct({
|
|
|
713
783
|
export class CreateChatCompletionResponse extends /*#__PURE__*/S.Class("CreateChatCompletionResponse")({
|
|
714
784
|
"id": S.String,
|
|
715
785
|
"choices": /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
716
|
-
"finish_reason":
|
|
786
|
+
"finish_reason": CreateChatCompletionResponseChoicesFinishReason,
|
|
717
787
|
"index": S.Int,
|
|
718
788
|
"message": ChatCompletionResponseMessage,
|
|
719
789
|
"logprobs": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
@@ -723,19 +793,20 @@ export class CreateChatCompletionResponse extends /*#__PURE__*/S.Class("CreateCh
|
|
|
723
793
|
})),
|
|
724
794
|
"created": S.Int,
|
|
725
795
|
"model": S.String,
|
|
726
|
-
"service_tier": /*#__PURE__*/S.optionalWith(
|
|
796
|
+
"service_tier": /*#__PURE__*/S.optionalWith(CreateChatCompletionResponseServiceTier, {
|
|
727
797
|
nullable: true
|
|
728
798
|
}),
|
|
729
799
|
"system_fingerprint": /*#__PURE__*/S.optionalWith(S.String, {
|
|
730
800
|
nullable: true
|
|
731
801
|
}),
|
|
732
|
-
"object":
|
|
802
|
+
"object": CreateChatCompletionResponseObject,
|
|
733
803
|
"usage": /*#__PURE__*/S.optionalWith(CompletionUsage, {
|
|
734
804
|
nullable: true
|
|
735
805
|
})
|
|
736
806
|
}) {}
|
|
807
|
+
export class CreateCompletionRequestModel extends /*#__PURE__*/S.Literal("gpt-3.5-turbo-instruct", "davinci-002", "babbage-002") {}
|
|
737
808
|
export class CreateCompletionRequest extends /*#__PURE__*/S.Class("CreateCompletionRequest")({
|
|
738
|
-
"model": /*#__PURE__*/S.Union(S.String,
|
|
809
|
+
"model": /*#__PURE__*/S.Union(S.String, CreateCompletionRequestModel),
|
|
739
810
|
"prompt": /*#__PURE__*/S.NullOr(S.Union(S.String, S.Array(S.String), S.NonEmptyArray(S.Int), S.NonEmptyArray(S.NonEmptyArray(S.Int)))).pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "<|endoftext|>")),
|
|
740
811
|
"best_of": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(20)), {
|
|
741
812
|
nullable: true,
|
|
@@ -770,7 +841,7 @@ export class CreateCompletionRequest extends /*#__PURE__*/S.Class("CreateComplet
|
|
|
770
841
|
nullable: true,
|
|
771
842
|
default: () => 0
|
|
772
843
|
}),
|
|
773
|
-
"seed": /*#__PURE__*/S.optionalWith(
|
|
844
|
+
"seed": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
774
845
|
nullable: true
|
|
775
846
|
}),
|
|
776
847
|
"stop": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(S.String).pipe( /*#__PURE__*/S.minItems(1), /*#__PURE__*/S.maxItems(4))), {
|
|
@@ -798,10 +869,12 @@ export class CreateCompletionRequest extends /*#__PURE__*/S.Class("CreateComplet
|
|
|
798
869
|
nullable: true
|
|
799
870
|
})
|
|
800
871
|
}) {}
|
|
872
|
+
export class CreateCompletionResponseChoicesFinishReason extends /*#__PURE__*/S.Literal("stop", "length", "content_filter") {}
|
|
873
|
+
export class CreateCompletionResponseObject extends /*#__PURE__*/S.Literal("text_completion") {}
|
|
801
874
|
export class CreateCompletionResponse extends /*#__PURE__*/S.Class("CreateCompletionResponse")({
|
|
802
875
|
"id": S.String,
|
|
803
876
|
"choices": /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
804
|
-
"finish_reason":
|
|
877
|
+
"finish_reason": CreateCompletionResponseChoicesFinishReason,
|
|
805
878
|
"index": S.Int,
|
|
806
879
|
"logprobs": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
807
880
|
"text_offset": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.Int), {
|
|
@@ -827,15 +900,17 @@ export class CreateCompletionResponse extends /*#__PURE__*/S.Class("CreateComple
|
|
|
827
900
|
"system_fingerprint": /*#__PURE__*/S.optionalWith(S.String, {
|
|
828
901
|
nullable: true
|
|
829
902
|
}),
|
|
830
|
-
"object":
|
|
903
|
+
"object": CreateCompletionResponseObject,
|
|
831
904
|
"usage": /*#__PURE__*/S.optionalWith(CompletionUsage, {
|
|
832
905
|
nullable: true
|
|
833
906
|
})
|
|
834
907
|
}) {}
|
|
908
|
+
export class CreateEmbeddingRequestModel extends /*#__PURE__*/S.Literal("text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large") {}
|
|
909
|
+
export class CreateEmbeddingRequestEncodingFormat extends /*#__PURE__*/S.Literal("float", "base64") {}
|
|
835
910
|
export class CreateEmbeddingRequest extends /*#__PURE__*/S.Class("CreateEmbeddingRequest")({
|
|
836
911
|
"input": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(S.String).pipe( /*#__PURE__*/S.minItems(1), /*#__PURE__*/S.maxItems(2048)), /*#__PURE__*/S.Array(S.Int).pipe( /*#__PURE__*/S.minItems(1), /*#__PURE__*/S.maxItems(2048)), /*#__PURE__*/S.Array(S.NonEmptyArray(S.Int)).pipe( /*#__PURE__*/S.minItems(1), /*#__PURE__*/S.maxItems(2048))),
|
|
837
|
-
"model": /*#__PURE__*/S.Union(S.String,
|
|
838
|
-
"encoding_format": /*#__PURE__*/S.optionalWith(
|
|
912
|
+
"model": /*#__PURE__*/S.Union(S.String, CreateEmbeddingRequestModel),
|
|
913
|
+
"encoding_format": /*#__PURE__*/S.optionalWith(CreateEmbeddingRequestEncodingFormat, {
|
|
839
914
|
nullable: true,
|
|
840
915
|
default: () => "float"
|
|
841
916
|
}),
|
|
@@ -846,44 +921,65 @@ export class CreateEmbeddingRequest extends /*#__PURE__*/S.Class("CreateEmbeddin
|
|
|
846
921
|
nullable: true
|
|
847
922
|
})
|
|
848
923
|
}) {}
|
|
924
|
+
export class EmbeddingObject extends /*#__PURE__*/S.Literal("embedding") {}
|
|
849
925
|
export class Embedding extends /*#__PURE__*/S.Struct({
|
|
850
926
|
"index": S.Int,
|
|
851
927
|
"embedding": /*#__PURE__*/S.Array(S.Number),
|
|
852
|
-
"object":
|
|
928
|
+
"object": EmbeddingObject
|
|
853
929
|
}) {}
|
|
930
|
+
export class CreateEmbeddingResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
854
931
|
export class CreateEmbeddingResponse extends /*#__PURE__*/S.Class("CreateEmbeddingResponse")({
|
|
855
932
|
"data": /*#__PURE__*/S.Array(Embedding),
|
|
856
933
|
"model": S.String,
|
|
857
|
-
"object":
|
|
934
|
+
"object": CreateEmbeddingResponseObject,
|
|
858
935
|
"usage": /*#__PURE__*/S.Struct({
|
|
859
936
|
"prompt_tokens": S.Int,
|
|
860
937
|
"total_tokens": S.Int
|
|
861
938
|
})
|
|
862
939
|
}) {}
|
|
940
|
+
export class ListFilesParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
863
941
|
export class ListFilesParams extends /*#__PURE__*/S.Struct({
|
|
864
942
|
"purpose": /*#__PURE__*/S.optionalWith(S.String, {
|
|
865
943
|
nullable: true
|
|
944
|
+
}),
|
|
945
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
946
|
+
nullable: true,
|
|
947
|
+
default: () => 10000
|
|
948
|
+
}),
|
|
949
|
+
"order": /*#__PURE__*/S.optionalWith(ListFilesParamsOrder, {
|
|
950
|
+
nullable: true,
|
|
951
|
+
default: () => "desc"
|
|
952
|
+
}),
|
|
953
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
954
|
+
nullable: true
|
|
866
955
|
})
|
|
867
956
|
}) {}
|
|
957
|
+
export class OpenAIFileObject extends /*#__PURE__*/S.Literal("file") {}
|
|
958
|
+
export class OpenAIFilePurpose extends /*#__PURE__*/S.Literal("assistants", "assistants_output", "batch", "batch_output", "fine-tune", "fine-tune-results", "vision") {}
|
|
959
|
+
export class OpenAIFileStatus extends /*#__PURE__*/S.Literal("uploaded", "processed", "error") {}
|
|
868
960
|
export class OpenAIFile extends /*#__PURE__*/S.Struct({
|
|
869
961
|
"id": S.String,
|
|
870
962
|
"bytes": S.Int,
|
|
871
963
|
"created_at": S.Int,
|
|
872
964
|
"filename": S.String,
|
|
873
|
-
"object":
|
|
874
|
-
"purpose":
|
|
875
|
-
"status":
|
|
965
|
+
"object": OpenAIFileObject,
|
|
966
|
+
"purpose": OpenAIFilePurpose,
|
|
967
|
+
"status": OpenAIFileStatus,
|
|
876
968
|
"status_details": /*#__PURE__*/S.optionalWith(S.String, {
|
|
877
969
|
nullable: true
|
|
878
970
|
})
|
|
879
971
|
}) {}
|
|
880
972
|
export class ListFilesResponse extends /*#__PURE__*/S.Class("ListFilesResponse")({
|
|
973
|
+
"object": S.String,
|
|
881
974
|
"data": /*#__PURE__*/S.Array(OpenAIFile),
|
|
882
|
-
"
|
|
975
|
+
"first_id": S.String,
|
|
976
|
+
"last_id": S.String,
|
|
977
|
+
"has_more": S.Boolean
|
|
883
978
|
}) {}
|
|
979
|
+
export class DeleteFileResponseObject extends /*#__PURE__*/S.Literal("file") {}
|
|
884
980
|
export class DeleteFileResponse extends /*#__PURE__*/S.Class("DeleteFileResponse")({
|
|
885
981
|
"id": S.String,
|
|
886
|
-
"object":
|
|
982
|
+
"object": DeleteFileResponseObject,
|
|
887
983
|
"deleted": S.Boolean
|
|
888
984
|
}) {}
|
|
889
985
|
export class DownloadFile200 extends S.String {}
|
|
@@ -896,8 +992,14 @@ export class ListPaginatedFineTuningJobsParams extends /*#__PURE__*/S.Struct({
|
|
|
896
992
|
default: () => 20
|
|
897
993
|
})
|
|
898
994
|
}) {}
|
|
995
|
+
export class FineTuningJobHyperparametersBatchSize extends /*#__PURE__*/S.Literal("auto") {}
|
|
996
|
+
export class FineTuningJobHyperparametersLearningRateMultiplier extends /*#__PURE__*/S.Literal("auto") {}
|
|
997
|
+
export class FineTuningJobHyperparametersNEpochs extends /*#__PURE__*/S.Literal("auto") {}
|
|
998
|
+
export class FineTuningJobObject extends /*#__PURE__*/S.Literal("fine_tuning.job") {}
|
|
999
|
+
export class FineTuningJobStatus extends /*#__PURE__*/S.Literal("validating_files", "queued", "running", "succeeded", "failed", "cancelled") {}
|
|
1000
|
+
export class FineTuningIntegrationType extends /*#__PURE__*/S.Literal("wandb") {}
|
|
899
1001
|
export class FineTuningIntegration extends /*#__PURE__*/S.Struct({
|
|
900
|
-
"type":
|
|
1002
|
+
"type": FineTuningIntegrationType,
|
|
901
1003
|
"wandb": /*#__PURE__*/S.Struct({
|
|
902
1004
|
"project": S.String,
|
|
903
1005
|
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -911,6 +1013,65 @@ export class FineTuningIntegration extends /*#__PURE__*/S.Struct({
|
|
|
911
1013
|
})
|
|
912
1014
|
})
|
|
913
1015
|
}) {}
|
|
1016
|
+
export class FineTuneMethodType extends /*#__PURE__*/S.Literal("supervised", "dpo") {}
|
|
1017
|
+
export class FineTuneSupervisedMethodHyperparametersBatchSize extends /*#__PURE__*/S.Literal("auto") {}
|
|
1018
|
+
export class FineTuneSupervisedMethodHyperparametersLearningRateMultiplier extends /*#__PURE__*/S.Literal("auto") {}
|
|
1019
|
+
export class FineTuneSupervisedMethodHyperparametersNEpochs extends /*#__PURE__*/S.Literal("auto") {}
|
|
1020
|
+
export class FineTuneSupervisedMethod extends /*#__PURE__*/S.Struct({
|
|
1021
|
+
"hyperparameters": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1022
|
+
"batch_size": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneSupervisedMethodHyperparametersBatchSize, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(256))), {
|
|
1023
|
+
nullable: true,
|
|
1024
|
+
default: () => "auto"
|
|
1025
|
+
}),
|
|
1026
|
+
"learning_rate_multiplier": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneSupervisedMethodHyperparametersLearningRateMultiplier, /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThan(0))), {
|
|
1027
|
+
nullable: true,
|
|
1028
|
+
default: () => "auto"
|
|
1029
|
+
}),
|
|
1030
|
+
"n_epochs": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneSupervisedMethodHyperparametersNEpochs, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(50))), {
|
|
1031
|
+
nullable: true,
|
|
1032
|
+
default: () => "auto"
|
|
1033
|
+
})
|
|
1034
|
+
}), {
|
|
1035
|
+
nullable: true
|
|
1036
|
+
})
|
|
1037
|
+
}) {}
|
|
1038
|
+
export class FineTuneDPOMethodHyperparametersBeta extends /*#__PURE__*/S.Literal("auto") {}
|
|
1039
|
+
export class FineTuneDPOMethodHyperparametersBatchSize extends /*#__PURE__*/S.Literal("auto") {}
|
|
1040
|
+
export class FineTuneDPOMethodHyperparametersLearningRateMultiplier extends /*#__PURE__*/S.Literal("auto") {}
|
|
1041
|
+
export class FineTuneDPOMethodHyperparametersNEpochs extends /*#__PURE__*/S.Literal("auto") {}
|
|
1042
|
+
export class FineTuneDPOMethod extends /*#__PURE__*/S.Struct({
|
|
1043
|
+
"hyperparameters": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1044
|
+
"beta": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneDPOMethodHyperparametersBeta, /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThan(0), /*#__PURE__*/S.lessThanOrEqualTo(2))), {
|
|
1045
|
+
nullable: true,
|
|
1046
|
+
default: () => "auto"
|
|
1047
|
+
}),
|
|
1048
|
+
"batch_size": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneDPOMethodHyperparametersBatchSize, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(256))), {
|
|
1049
|
+
nullable: true,
|
|
1050
|
+
default: () => "auto"
|
|
1051
|
+
}),
|
|
1052
|
+
"learning_rate_multiplier": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneDPOMethodHyperparametersLearningRateMultiplier, /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThan(0))), {
|
|
1053
|
+
nullable: true,
|
|
1054
|
+
default: () => "auto"
|
|
1055
|
+
}),
|
|
1056
|
+
"n_epochs": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneDPOMethodHyperparametersNEpochs, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(50))), {
|
|
1057
|
+
nullable: true,
|
|
1058
|
+
default: () => "auto"
|
|
1059
|
+
})
|
|
1060
|
+
}), {
|
|
1061
|
+
nullable: true
|
|
1062
|
+
})
|
|
1063
|
+
}) {}
|
|
1064
|
+
export class FineTuneMethod extends /*#__PURE__*/S.Struct({
|
|
1065
|
+
"type": /*#__PURE__*/S.optionalWith(FineTuneMethodType, {
|
|
1066
|
+
nullable: true
|
|
1067
|
+
}),
|
|
1068
|
+
"supervised": /*#__PURE__*/S.optionalWith(FineTuneSupervisedMethod, {
|
|
1069
|
+
nullable: true
|
|
1070
|
+
}),
|
|
1071
|
+
"dpo": /*#__PURE__*/S.optionalWith(FineTuneDPOMethod, {
|
|
1072
|
+
nullable: true
|
|
1073
|
+
})
|
|
1074
|
+
}) {}
|
|
914
1075
|
export class FineTuningJob extends /*#__PURE__*/S.Struct({
|
|
915
1076
|
"id": S.String,
|
|
916
1077
|
"created_at": S.Int,
|
|
@@ -922,13 +1083,24 @@ export class FineTuningJob extends /*#__PURE__*/S.Struct({
|
|
|
922
1083
|
"fine_tuned_model": /*#__PURE__*/S.NullOr(S.String),
|
|
923
1084
|
"finished_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
924
1085
|
"hyperparameters": /*#__PURE__*/S.Struct({
|
|
925
|
-
"
|
|
1086
|
+
"batch_size": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuningJobHyperparametersBatchSize, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(256))), {
|
|
1087
|
+
nullable: true,
|
|
1088
|
+
default: () => "auto"
|
|
1089
|
+
}),
|
|
1090
|
+
"learning_rate_multiplier": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuningJobHyperparametersLearningRateMultiplier, /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThan(0))), {
|
|
1091
|
+
nullable: true,
|
|
1092
|
+
default: () => "auto"
|
|
1093
|
+
}),
|
|
1094
|
+
"n_epochs": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuningJobHyperparametersNEpochs, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(50))), {
|
|
1095
|
+
nullable: true,
|
|
1096
|
+
default: () => "auto"
|
|
1097
|
+
})
|
|
926
1098
|
}),
|
|
927
1099
|
"model": S.String,
|
|
928
|
-
"object":
|
|
1100
|
+
"object": FineTuningJobObject,
|
|
929
1101
|
"organization_id": S.String,
|
|
930
1102
|
"result_files": /*#__PURE__*/S.Array(S.String),
|
|
931
|
-
"status":
|
|
1103
|
+
"status": FineTuningJobStatus,
|
|
932
1104
|
"trained_tokens": /*#__PURE__*/S.NullOr(S.Int),
|
|
933
1105
|
"training_file": S.String,
|
|
934
1106
|
"validation_file": /*#__PURE__*/S.NullOr(S.String),
|
|
@@ -938,26 +1110,35 @@ export class FineTuningJob extends /*#__PURE__*/S.Struct({
|
|
|
938
1110
|
"seed": S.Int,
|
|
939
1111
|
"estimated_finish": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
940
1112
|
nullable: true
|
|
1113
|
+
}),
|
|
1114
|
+
"method": /*#__PURE__*/S.optionalWith(FineTuneMethod, {
|
|
1115
|
+
nullable: true
|
|
941
1116
|
})
|
|
942
1117
|
}) {}
|
|
1118
|
+
export class ListPaginatedFineTuningJobsResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
943
1119
|
export class ListPaginatedFineTuningJobsResponse extends /*#__PURE__*/S.Class("ListPaginatedFineTuningJobsResponse")({
|
|
944
1120
|
"data": /*#__PURE__*/S.Array(FineTuningJob),
|
|
945
1121
|
"has_more": S.Boolean,
|
|
946
|
-
"object":
|
|
1122
|
+
"object": ListPaginatedFineTuningJobsResponseObject
|
|
947
1123
|
}) {}
|
|
1124
|
+
export class CreateFineTuningJobRequestModel extends /*#__PURE__*/S.Literal("babbage-002", "davinci-002", "gpt-3.5-turbo", "gpt-4o-mini") {}
|
|
1125
|
+
export class CreateFineTuningJobRequestHyperparametersBatchSize extends /*#__PURE__*/S.Literal("auto") {}
|
|
1126
|
+
export class CreateFineTuningJobRequestHyperparametersLearningRateMultiplier extends /*#__PURE__*/S.Literal("auto") {}
|
|
1127
|
+
export class CreateFineTuningJobRequestHyperparametersNEpochs extends /*#__PURE__*/S.Literal("auto") {}
|
|
1128
|
+
export class CreateFineTuningJobRequestIntegrationsType extends /*#__PURE__*/S.Literal("wandb") {}
|
|
948
1129
|
export class CreateFineTuningJobRequest extends /*#__PURE__*/S.Class("CreateFineTuningJobRequest")({
|
|
949
|
-
"model": /*#__PURE__*/S.Union(S.String,
|
|
1130
|
+
"model": /*#__PURE__*/S.Union(S.String, CreateFineTuningJobRequestModel),
|
|
950
1131
|
"training_file": S.String,
|
|
951
1132
|
"hyperparameters": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
952
|
-
"batch_size": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(
|
|
1133
|
+
"batch_size": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(CreateFineTuningJobRequestHyperparametersBatchSize, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(256))), {
|
|
953
1134
|
nullable: true,
|
|
954
1135
|
default: () => "auto"
|
|
955
1136
|
}),
|
|
956
|
-
"learning_rate_multiplier": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(
|
|
1137
|
+
"learning_rate_multiplier": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(CreateFineTuningJobRequestHyperparametersLearningRateMultiplier, /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThan(0))), {
|
|
957
1138
|
nullable: true,
|
|
958
1139
|
default: () => "auto"
|
|
959
1140
|
}),
|
|
960
|
-
"n_epochs": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(
|
|
1141
|
+
"n_epochs": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(CreateFineTuningJobRequestHyperparametersNEpochs, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(50))), {
|
|
961
1142
|
nullable: true,
|
|
962
1143
|
default: () => "auto"
|
|
963
1144
|
})
|
|
@@ -971,7 +1152,7 @@ export class CreateFineTuningJobRequest extends /*#__PURE__*/S.Class("CreateFine
|
|
|
971
1152
|
nullable: true
|
|
972
1153
|
}),
|
|
973
1154
|
"integrations": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
974
|
-
"type":
|
|
1155
|
+
"type": CreateFineTuningJobRequestIntegrationsType,
|
|
975
1156
|
"wandb": /*#__PURE__*/S.Struct({
|
|
976
1157
|
"project": S.String,
|
|
977
1158
|
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -989,6 +1170,9 @@ export class CreateFineTuningJobRequest extends /*#__PURE__*/S.Class("CreateFine
|
|
|
989
1170
|
}),
|
|
990
1171
|
"seed": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(2147483647)), {
|
|
991
1172
|
nullable: true
|
|
1173
|
+
}),
|
|
1174
|
+
"method": /*#__PURE__*/S.optionalWith(FineTuneMethod, {
|
|
1175
|
+
nullable: true
|
|
992
1176
|
})
|
|
993
1177
|
}) {}
|
|
994
1178
|
export class ListFineTuningJobCheckpointsParams extends /*#__PURE__*/S.Struct({
|
|
@@ -1000,6 +1184,7 @@ export class ListFineTuningJobCheckpointsParams extends /*#__PURE__*/S.Struct({
|
|
|
1000
1184
|
default: () => 10
|
|
1001
1185
|
})
|
|
1002
1186
|
}) {}
|
|
1187
|
+
export class FineTuningJobCheckpointObject extends /*#__PURE__*/S.Literal("fine_tuning.job.checkpoint") {}
|
|
1003
1188
|
export class FineTuningJobCheckpoint extends /*#__PURE__*/S.Struct({
|
|
1004
1189
|
"id": S.String,
|
|
1005
1190
|
"created_at": S.Int,
|
|
@@ -1029,11 +1214,12 @@ export class FineTuningJobCheckpoint extends /*#__PURE__*/S.Struct({
|
|
|
1029
1214
|
})
|
|
1030
1215
|
}),
|
|
1031
1216
|
"fine_tuning_job_id": S.String,
|
|
1032
|
-
"object":
|
|
1217
|
+
"object": FineTuningJobCheckpointObject
|
|
1033
1218
|
}) {}
|
|
1219
|
+
export class ListFineTuningJobCheckpointsResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
1034
1220
|
export class ListFineTuningJobCheckpointsResponse extends /*#__PURE__*/S.Class("ListFineTuningJobCheckpointsResponse")({
|
|
1035
1221
|
"data": /*#__PURE__*/S.Array(FineTuningJobCheckpoint),
|
|
1036
|
-
"object":
|
|
1222
|
+
"object": ListFineTuningJobCheckpointsResponseObject,
|
|
1037
1223
|
"first_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1038
1224
|
nullable: true
|
|
1039
1225
|
}),
|
|
@@ -1051,16 +1237,29 @@ export class ListFineTuningEventsParams extends /*#__PURE__*/S.Struct({
|
|
|
1051
1237
|
default: () => 20
|
|
1052
1238
|
})
|
|
1053
1239
|
}) {}
|
|
1240
|
+
export class FineTuningJobEventObject extends /*#__PURE__*/S.Literal("fine_tuning.job.event") {}
|
|
1241
|
+
export class FineTuningJobEventLevel extends /*#__PURE__*/S.Literal("info", "warn", "error") {}
|
|
1242
|
+
export class FineTuningJobEventType extends /*#__PURE__*/S.Literal("message", "metrics") {}
|
|
1054
1243
|
export class FineTuningJobEvent extends /*#__PURE__*/S.Struct({
|
|
1244
|
+
"object": FineTuningJobEventObject,
|
|
1055
1245
|
"id": S.String,
|
|
1056
1246
|
"created_at": S.Int,
|
|
1057
|
-
"level":
|
|
1247
|
+
"level": FineTuningJobEventLevel,
|
|
1058
1248
|
"message": S.String,
|
|
1059
|
-
"
|
|
1249
|
+
"type": /*#__PURE__*/S.optionalWith(FineTuningJobEventType, {
|
|
1250
|
+
nullable: true
|
|
1251
|
+
}),
|
|
1252
|
+
"data": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Record({
|
|
1253
|
+
key: S.String,
|
|
1254
|
+
value: S.Unknown
|
|
1255
|
+
}), {
|
|
1256
|
+
nullable: true
|
|
1257
|
+
})
|
|
1060
1258
|
}) {}
|
|
1259
|
+
export class ListFineTuningJobEventsResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
1061
1260
|
export class ListFineTuningJobEventsResponse extends /*#__PURE__*/S.Class("ListFineTuningJobEventsResponse")({
|
|
1062
1261
|
"data": /*#__PURE__*/S.Array(FineTuningJobEvent),
|
|
1063
|
-
"object":
|
|
1262
|
+
"object": ListFineTuningJobEventsResponseObject
|
|
1064
1263
|
}) {}
|
|
1065
1264
|
export class Image extends /*#__PURE__*/S.Struct({
|
|
1066
1265
|
"b64_json": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -1077,9 +1276,14 @@ export class ImagesResponse extends /*#__PURE__*/S.Class("ImagesResponse")({
|
|
|
1077
1276
|
"created": S.Int,
|
|
1078
1277
|
"data": /*#__PURE__*/S.Array(Image)
|
|
1079
1278
|
}) {}
|
|
1279
|
+
export class CreateImageRequestModel extends /*#__PURE__*/S.Literal("dall-e-2", "dall-e-3") {}
|
|
1280
|
+
export class CreateImageRequestQuality extends /*#__PURE__*/S.Literal("standard", "hd") {}
|
|
1281
|
+
export class CreateImageRequestResponseFormat extends /*#__PURE__*/S.Literal("url", "b64_json") {}
|
|
1282
|
+
export class CreateImageRequestSize extends /*#__PURE__*/S.Literal("256x256", "512x512", "1024x1024", "1792x1024", "1024x1792") {}
|
|
1283
|
+
export class CreateImageRequestStyle extends /*#__PURE__*/S.Literal("vivid", "natural") {}
|
|
1080
1284
|
export class CreateImageRequest extends /*#__PURE__*/S.Class("CreateImageRequest")({
|
|
1081
1285
|
"prompt": S.String,
|
|
1082
|
-
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String,
|
|
1286
|
+
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String, CreateImageRequestModel), {
|
|
1083
1287
|
nullable: true,
|
|
1084
1288
|
default: () => "dall-e-2"
|
|
1085
1289
|
}),
|
|
@@ -1087,19 +1291,19 @@ export class CreateImageRequest extends /*#__PURE__*/S.Class("CreateImageRequest
|
|
|
1087
1291
|
nullable: true,
|
|
1088
1292
|
default: () => 1
|
|
1089
1293
|
}),
|
|
1090
|
-
"quality": /*#__PURE__*/S.optionalWith(
|
|
1294
|
+
"quality": /*#__PURE__*/S.optionalWith(CreateImageRequestQuality, {
|
|
1091
1295
|
nullable: true,
|
|
1092
1296
|
default: () => "standard"
|
|
1093
1297
|
}),
|
|
1094
|
-
"response_format": /*#__PURE__*/S.optionalWith(
|
|
1298
|
+
"response_format": /*#__PURE__*/S.optionalWith(CreateImageRequestResponseFormat, {
|
|
1095
1299
|
nullable: true,
|
|
1096
1300
|
default: () => "url"
|
|
1097
1301
|
}),
|
|
1098
|
-
"size": /*#__PURE__*/S.optionalWith(
|
|
1302
|
+
"size": /*#__PURE__*/S.optionalWith(CreateImageRequestSize, {
|
|
1099
1303
|
nullable: true,
|
|
1100
1304
|
default: () => "1024x1024"
|
|
1101
1305
|
}),
|
|
1102
|
-
"style": /*#__PURE__*/S.optionalWith(
|
|
1306
|
+
"style": /*#__PURE__*/S.optionalWith(CreateImageRequestStyle, {
|
|
1103
1307
|
nullable: true,
|
|
1104
1308
|
default: () => "vivid"
|
|
1105
1309
|
}),
|
|
@@ -1107,14 +1311,16 @@ export class CreateImageRequest extends /*#__PURE__*/S.Class("CreateImageRequest
|
|
|
1107
1311
|
nullable: true
|
|
1108
1312
|
})
|
|
1109
1313
|
}) {}
|
|
1314
|
+
export class ListModelsResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
1315
|
+
export class ModelObject extends /*#__PURE__*/S.Literal("model") {}
|
|
1110
1316
|
export class Model extends /*#__PURE__*/S.Struct({
|
|
1111
1317
|
"id": S.String,
|
|
1112
1318
|
"created": S.Int,
|
|
1113
|
-
"object":
|
|
1319
|
+
"object": ModelObject,
|
|
1114
1320
|
"owned_by": S.String
|
|
1115
1321
|
}) {}
|
|
1116
1322
|
export class ListModelsResponse extends /*#__PURE__*/S.Class("ListModelsResponse")({
|
|
1117
|
-
"object":
|
|
1323
|
+
"object": ListModelsResponseObject,
|
|
1118
1324
|
"data": /*#__PURE__*/S.Array(Model)
|
|
1119
1325
|
}) {}
|
|
1120
1326
|
export class DeleteModelResponse extends /*#__PURE__*/S.Class("DeleteModelResponse")({
|
|
@@ -1122,21 +1328,36 @@ export class DeleteModelResponse extends /*#__PURE__*/S.Class("DeleteModelRespon
|
|
|
1122
1328
|
"deleted": S.Boolean,
|
|
1123
1329
|
"object": S.String
|
|
1124
1330
|
}) {}
|
|
1331
|
+
export class CreateModerationRequestInputType extends /*#__PURE__*/S.Literal("text") {}
|
|
1332
|
+
export class CreateModerationRequestModel extends /*#__PURE__*/S.Literal("omni-moderation-latest", "omni-moderation-2024-09-26", "text-moderation-latest", "text-moderation-stable") {}
|
|
1125
1333
|
export class CreateModerationRequest extends /*#__PURE__*/S.Class("CreateModerationRequest")({
|
|
1126
1334
|
"input": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(S.String), /*#__PURE__*/S.Array( /*#__PURE__*/S.Union( /*#__PURE__*/S.Struct({
|
|
1127
|
-
"type":
|
|
1335
|
+
"type": CreateModerationRequestInputType,
|
|
1128
1336
|
"image_url": /*#__PURE__*/S.Struct({
|
|
1129
1337
|
"url": S.String
|
|
1130
1338
|
})
|
|
1131
1339
|
}), /*#__PURE__*/S.Struct({
|
|
1132
|
-
"type":
|
|
1340
|
+
"type": CreateModerationRequestInputType,
|
|
1133
1341
|
"text": S.String
|
|
1134
1342
|
})))),
|
|
1135
|
-
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String,
|
|
1343
|
+
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String, CreateModerationRequestModel), {
|
|
1136
1344
|
nullable: true,
|
|
1137
1345
|
default: () => "omni-moderation-latest"
|
|
1138
1346
|
})
|
|
1139
1347
|
}) {}
|
|
1348
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesHate extends /*#__PURE__*/S.Literal("text") {}
|
|
1349
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesHateThreatening extends /*#__PURE__*/S.Literal("text") {}
|
|
1350
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesHarassment extends /*#__PURE__*/S.Literal("text") {}
|
|
1351
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesHarassmentThreatening extends /*#__PURE__*/S.Literal("text") {}
|
|
1352
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesIllicit extends /*#__PURE__*/S.Literal("text") {}
|
|
1353
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesIllicitViolent extends /*#__PURE__*/S.Literal("text") {}
|
|
1354
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarm extends /*#__PURE__*/S.Literal("text", "image") {}
|
|
1355
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmIntent extends /*#__PURE__*/S.Literal("text", "image") {}
|
|
1356
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmInstructions extends /*#__PURE__*/S.Literal("text", "image") {}
|
|
1357
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesSexual extends /*#__PURE__*/S.Literal("text", "image") {}
|
|
1358
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesSexualMinors extends /*#__PURE__*/S.Literal("text") {}
|
|
1359
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesViolence extends /*#__PURE__*/S.Literal("text", "image") {}
|
|
1360
|
+
export class CreateModerationResponseResultsCategoryAppliedInputTypesViolenceGraphic extends /*#__PURE__*/S.Literal("text", "image") {}
|
|
1140
1361
|
export class CreateModerationResponse extends /*#__PURE__*/S.Class("CreateModerationResponse")({
|
|
1141
1362
|
"id": S.String,
|
|
1142
1363
|
"model": S.String,
|
|
@@ -1173,23 +1394,107 @@ export class CreateModerationResponse extends /*#__PURE__*/S.Class("CreateModera
|
|
|
1173
1394
|
"violence/graphic": S.Number
|
|
1174
1395
|
}),
|
|
1175
1396
|
"category_applied_input_types": /*#__PURE__*/S.Struct({
|
|
1176
|
-
"hate": /*#__PURE__*/S.Array(
|
|
1177
|
-
"hate/threatening": /*#__PURE__*/S.Array(
|
|
1178
|
-
"harassment": /*#__PURE__*/S.Array(
|
|
1179
|
-
"harassment/threatening": /*#__PURE__*/S.Array(
|
|
1180
|
-
"illicit": /*#__PURE__*/S.Array(
|
|
1181
|
-
"illicit/violent": /*#__PURE__*/S.Array(
|
|
1182
|
-
"self-harm": /*#__PURE__*/S.Array(
|
|
1183
|
-
"self-harm/intent": /*#__PURE__*/S.Array(
|
|
1184
|
-
"self-harm/instructions": /*#__PURE__*/S.Array(
|
|
1185
|
-
"sexual": /*#__PURE__*/S.Array(
|
|
1186
|
-
"sexual/minors": /*#__PURE__*/S.Array(
|
|
1187
|
-
"violence": /*#__PURE__*/S.Array(
|
|
1188
|
-
"violence/graphic": /*#__PURE__*/S.Array(
|
|
1397
|
+
"hate": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesHate),
|
|
1398
|
+
"hate/threatening": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesHateThreatening),
|
|
1399
|
+
"harassment": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesHarassment),
|
|
1400
|
+
"harassment/threatening": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesHarassmentThreatening),
|
|
1401
|
+
"illicit": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesIllicit),
|
|
1402
|
+
"illicit/violent": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesIllicitViolent),
|
|
1403
|
+
"self-harm": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarm),
|
|
1404
|
+
"self-harm/intent": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmIntent),
|
|
1405
|
+
"self-harm/instructions": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmInstructions),
|
|
1406
|
+
"sexual": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesSexual),
|
|
1407
|
+
"sexual/minors": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesSexualMinors),
|
|
1408
|
+
"violence": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesViolence),
|
|
1409
|
+
"violence/graphic": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesViolenceGraphic)
|
|
1189
1410
|
})
|
|
1190
1411
|
}))
|
|
1191
1412
|
}) {}
|
|
1192
|
-
export class
|
|
1413
|
+
export class AdminApiKeysListParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
1414
|
+
export class AdminApiKeysListParams extends /*#__PURE__*/S.Struct({
|
|
1415
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1416
|
+
nullable: true
|
|
1417
|
+
}),
|
|
1418
|
+
"order": /*#__PURE__*/S.optionalWith(AdminApiKeysListParamsOrder, {
|
|
1419
|
+
nullable: true,
|
|
1420
|
+
default: () => "asc"
|
|
1421
|
+
}),
|
|
1422
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1423
|
+
nullable: true,
|
|
1424
|
+
default: () => 20
|
|
1425
|
+
})
|
|
1426
|
+
}) {}
|
|
1427
|
+
export class AdminApiKey extends /*#__PURE__*/S.Struct({
|
|
1428
|
+
"object": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1429
|
+
nullable: true
|
|
1430
|
+
}),
|
|
1431
|
+
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1432
|
+
nullable: true
|
|
1433
|
+
}),
|
|
1434
|
+
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1435
|
+
nullable: true
|
|
1436
|
+
}),
|
|
1437
|
+
"redacted_value": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1438
|
+
nullable: true
|
|
1439
|
+
}),
|
|
1440
|
+
"value": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1441
|
+
nullable: true
|
|
1442
|
+
}),
|
|
1443
|
+
"created_at": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1444
|
+
nullable: true
|
|
1445
|
+
}),
|
|
1446
|
+
"owner": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1447
|
+
"type": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1448
|
+
nullable: true
|
|
1449
|
+
}),
|
|
1450
|
+
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1451
|
+
nullable: true
|
|
1452
|
+
}),
|
|
1453
|
+
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1454
|
+
nullable: true
|
|
1455
|
+
}),
|
|
1456
|
+
"created_at": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1457
|
+
nullable: true
|
|
1458
|
+
}),
|
|
1459
|
+
"role": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1460
|
+
nullable: true
|
|
1461
|
+
})
|
|
1462
|
+
}), {
|
|
1463
|
+
nullable: true
|
|
1464
|
+
})
|
|
1465
|
+
}) {}
|
|
1466
|
+
export class ApiKeyList extends /*#__PURE__*/S.Class("ApiKeyList")({
|
|
1467
|
+
"object": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1468
|
+
nullable: true
|
|
1469
|
+
}),
|
|
1470
|
+
"data": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(AdminApiKey), {
|
|
1471
|
+
nullable: true
|
|
1472
|
+
}),
|
|
1473
|
+
"has_more": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1474
|
+
nullable: true
|
|
1475
|
+
}),
|
|
1476
|
+
"first_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1477
|
+
nullable: true
|
|
1478
|
+
}),
|
|
1479
|
+
"last_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1480
|
+
nullable: true
|
|
1481
|
+
})
|
|
1482
|
+
}) {}
|
|
1483
|
+
export class AdminApiKeysCreateRequest extends /*#__PURE__*/S.Class("AdminApiKeysCreateRequest")({
|
|
1484
|
+
"name": S.String
|
|
1485
|
+
}) {}
|
|
1486
|
+
export class AdminApiKeysDelete200 extends /*#__PURE__*/S.Struct({
|
|
1487
|
+
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1488
|
+
nullable: true
|
|
1489
|
+
}),
|
|
1490
|
+
"object": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1491
|
+
nullable: true
|
|
1492
|
+
}),
|
|
1493
|
+
"deleted": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1494
|
+
nullable: true
|
|
1495
|
+
})
|
|
1496
|
+
}) {}
|
|
1497
|
+
export class AuditLogEventType extends /*#__PURE__*/S.Literal("api_key.created", "api_key.updated", "api_key.deleted", "invite.sent", "invite.accepted", "invite.deleted", "login.succeeded", "login.failed", "logout.succeeded", "logout.failed", "organization.updated", "project.created", "project.updated", "project.archived", "service_account.created", "service_account.updated", "service_account.deleted", "rate_limit.updated", "rate_limit.deleted", "user.added", "user.updated", "user.deleted") {}
|
|
1193
1498
|
export class ListAuditLogsParams extends /*#__PURE__*/S.Struct({
|
|
1194
1499
|
"effective_at[gt]": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1195
1500
|
nullable: true
|
|
@@ -1229,6 +1534,8 @@ export class ListAuditLogsParams extends /*#__PURE__*/S.Struct({
|
|
|
1229
1534
|
nullable: true
|
|
1230
1535
|
})
|
|
1231
1536
|
}) {}
|
|
1537
|
+
export class ListAuditLogsResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
1538
|
+
export class AuditLogActorType extends /*#__PURE__*/S.Literal("session", "api_key") {}
|
|
1232
1539
|
export class AuditLogActorUser extends /*#__PURE__*/S.Struct({
|
|
1233
1540
|
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1234
1541
|
nullable: true
|
|
@@ -1245,6 +1552,7 @@ export class AuditLogActorSession extends /*#__PURE__*/S.Struct({
|
|
|
1245
1552
|
nullable: true
|
|
1246
1553
|
})
|
|
1247
1554
|
}) {}
|
|
1555
|
+
export class AuditLogActorApiKeyType extends /*#__PURE__*/S.Literal("user", "service_account") {}
|
|
1248
1556
|
export class AuditLogActorServiceAccount extends /*#__PURE__*/S.Struct({
|
|
1249
1557
|
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1250
1558
|
nullable: true
|
|
@@ -1254,7 +1562,7 @@ export class AuditLogActorApiKey extends /*#__PURE__*/S.Struct({
|
|
|
1254
1562
|
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1255
1563
|
nullable: true
|
|
1256
1564
|
}),
|
|
1257
|
-
"type": /*#__PURE__*/S.optionalWith(
|
|
1565
|
+
"type": /*#__PURE__*/S.optionalWith(AuditLogActorApiKeyType, {
|
|
1258
1566
|
nullable: true
|
|
1259
1567
|
}),
|
|
1260
1568
|
"user": /*#__PURE__*/S.optionalWith(AuditLogActorUser, {
|
|
@@ -1265,19 +1573,13 @@ export class AuditLogActorApiKey extends /*#__PURE__*/S.Struct({
|
|
|
1265
1573
|
})
|
|
1266
1574
|
}) {}
|
|
1267
1575
|
export class AuditLogActor extends /*#__PURE__*/S.Struct({
|
|
1268
|
-
"type": /*#__PURE__*/S.optionalWith(
|
|
1576
|
+
"type": /*#__PURE__*/S.optionalWith(AuditLogActorType, {
|
|
1269
1577
|
nullable: true
|
|
1270
1578
|
}),
|
|
1271
|
-
"session": /*#__PURE__*/S.optionalWith(
|
|
1272
|
-
key: S.String,
|
|
1273
|
-
value: S.Unknown
|
|
1274
|
-
}), {
|
|
1579
|
+
"session": /*#__PURE__*/S.optionalWith(AuditLogActorSession, {
|
|
1275
1580
|
nullable: true
|
|
1276
1581
|
}),
|
|
1277
|
-
"api_key": /*#__PURE__*/S.optionalWith(
|
|
1278
|
-
key: S.String,
|
|
1279
|
-
value: S.Unknown
|
|
1280
|
-
}), {
|
|
1582
|
+
"api_key": /*#__PURE__*/S.optionalWith(AuditLogActorApiKey, {
|
|
1281
1583
|
nullable: true
|
|
1282
1584
|
})
|
|
1283
1585
|
}) {}
|
|
@@ -1450,6 +1752,42 @@ export class AuditLog extends /*#__PURE__*/S.Struct({
|
|
|
1450
1752
|
}), {
|
|
1451
1753
|
nullable: true
|
|
1452
1754
|
}),
|
|
1755
|
+
"rate_limit.updated": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1756
|
+
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1757
|
+
nullable: true
|
|
1758
|
+
}),
|
|
1759
|
+
"changes_requested": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1760
|
+
"max_requests_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1761
|
+
nullable: true
|
|
1762
|
+
}),
|
|
1763
|
+
"max_tokens_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1764
|
+
nullable: true
|
|
1765
|
+
}),
|
|
1766
|
+
"max_images_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1767
|
+
nullable: true
|
|
1768
|
+
}),
|
|
1769
|
+
"max_audio_megabytes_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1770
|
+
nullable: true
|
|
1771
|
+
}),
|
|
1772
|
+
"max_requests_per_1_day": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1773
|
+
nullable: true
|
|
1774
|
+
}),
|
|
1775
|
+
"batch_1_day_max_input_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1776
|
+
nullable: true
|
|
1777
|
+
})
|
|
1778
|
+
}), {
|
|
1779
|
+
nullable: true
|
|
1780
|
+
})
|
|
1781
|
+
}), {
|
|
1782
|
+
nullable: true
|
|
1783
|
+
}),
|
|
1784
|
+
"rate_limit.deleted": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1785
|
+
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1786
|
+
nullable: true
|
|
1787
|
+
})
|
|
1788
|
+
}), {
|
|
1789
|
+
nullable: true
|
|
1790
|
+
}),
|
|
1453
1791
|
"service_account.created": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1454
1792
|
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1455
1793
|
nullable: true
|
|
@@ -1522,88 +1860,317 @@ export class AuditLog extends /*#__PURE__*/S.Struct({
|
|
|
1522
1860
|
})
|
|
1523
1861
|
}) {}
|
|
1524
1862
|
export class ListAuditLogsResponse extends /*#__PURE__*/S.Class("ListAuditLogsResponse")({
|
|
1525
|
-
"object":
|
|
1863
|
+
"object": ListAuditLogsResponseObject,
|
|
1526
1864
|
"data": /*#__PURE__*/S.Array(AuditLog),
|
|
1527
1865
|
"first_id": S.String,
|
|
1528
1866
|
"last_id": S.String,
|
|
1529
1867
|
"has_more": S.Boolean
|
|
1530
1868
|
}) {}
|
|
1531
|
-
export class
|
|
1869
|
+
export class UsageCostsParamsBucketWidth extends /*#__PURE__*/S.Literal("1d") {}
|
|
1870
|
+
export class UsageCostsParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "line_item") {}
|
|
1871
|
+
export class UsageCostsParams extends /*#__PURE__*/S.Struct({
|
|
1872
|
+
"start_time": S.Int,
|
|
1873
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1874
|
+
nullable: true
|
|
1875
|
+
}),
|
|
1876
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageCostsParamsBucketWidth, {
|
|
1877
|
+
nullable: true,
|
|
1878
|
+
default: () => "1d"
|
|
1879
|
+
}),
|
|
1880
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
1881
|
+
nullable: true
|
|
1882
|
+
}),
|
|
1883
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageCostsParamsGroupBy), {
|
|
1884
|
+
nullable: true
|
|
1885
|
+
}),
|
|
1532
1886
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1533
1887
|
nullable: true,
|
|
1534
|
-
default: () =>
|
|
1888
|
+
default: () => 7
|
|
1535
1889
|
}),
|
|
1536
|
-
"
|
|
1890
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1537
1891
|
nullable: true
|
|
1538
1892
|
})
|
|
1539
1893
|
}) {}
|
|
1540
|
-
export class
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
"
|
|
1545
|
-
"
|
|
1546
|
-
"
|
|
1547
|
-
|
|
1548
|
-
|
|
1894
|
+
export class UsageResponseObject extends /*#__PURE__*/S.Literal("page") {}
|
|
1895
|
+
export class UsageTimeBucketObject extends /*#__PURE__*/S.Literal("bucket") {}
|
|
1896
|
+
export class UsageCompletionsResultObject extends /*#__PURE__*/S.Literal("organization.usage.completions.result") {}
|
|
1897
|
+
export class UsageCompletionsResult extends /*#__PURE__*/S.Struct({
|
|
1898
|
+
"object": UsageCompletionsResultObject,
|
|
1899
|
+
"input_tokens": S.Int,
|
|
1900
|
+
"input_cached_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1901
|
+
nullable: true
|
|
1902
|
+
}),
|
|
1903
|
+
"output_tokens": S.Int,
|
|
1904
|
+
"input_audio_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1905
|
+
nullable: true
|
|
1906
|
+
}),
|
|
1907
|
+
"output_audio_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1908
|
+
nullable: true
|
|
1909
|
+
}),
|
|
1910
|
+
"num_model_requests": S.Int,
|
|
1911
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1912
|
+
nullable: true
|
|
1913
|
+
}),
|
|
1914
|
+
"user_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1915
|
+
nullable: true
|
|
1916
|
+
}),
|
|
1917
|
+
"api_key_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1918
|
+
nullable: true
|
|
1919
|
+
}),
|
|
1920
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1921
|
+
nullable: true
|
|
1922
|
+
}),
|
|
1923
|
+
"batch": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1549
1924
|
nullable: true
|
|
1550
1925
|
})
|
|
1551
1926
|
}) {}
|
|
1552
|
-
export class
|
|
1553
|
-
|
|
1554
|
-
"
|
|
1555
|
-
"
|
|
1927
|
+
export class UsageEmbeddingsResultObject extends /*#__PURE__*/S.Literal("organization.usage.embeddings.result") {}
|
|
1928
|
+
export class UsageEmbeddingsResult extends /*#__PURE__*/S.Struct({
|
|
1929
|
+
"object": UsageEmbeddingsResultObject,
|
|
1930
|
+
"input_tokens": S.Int,
|
|
1931
|
+
"num_model_requests": S.Int,
|
|
1932
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1556
1933
|
nullable: true
|
|
1557
1934
|
}),
|
|
1558
|
-
"
|
|
1935
|
+
"user_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1559
1936
|
nullable: true
|
|
1560
1937
|
}),
|
|
1561
|
-
"
|
|
1938
|
+
"api_key_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1939
|
+
nullable: true
|
|
1940
|
+
}),
|
|
1941
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1562
1942
|
nullable: true
|
|
1563
1943
|
})
|
|
1564
1944
|
}) {}
|
|
1565
|
-
export class
|
|
1566
|
-
|
|
1567
|
-
"
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
"
|
|
1571
|
-
|
|
1572
|
-
"deleted": S.Boolean
|
|
1573
|
-
}) {}
|
|
1574
|
-
export class ListProjectsParams extends /*#__PURE__*/S.Struct({
|
|
1575
|
-
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1576
|
-
nullable: true,
|
|
1577
|
-
default: () => 20
|
|
1945
|
+
export class UsageModerationsResultObject extends /*#__PURE__*/S.Literal("organization.usage.moderations.result") {}
|
|
1946
|
+
export class UsageModerationsResult extends /*#__PURE__*/S.Struct({
|
|
1947
|
+
"object": UsageModerationsResultObject,
|
|
1948
|
+
"input_tokens": S.Int,
|
|
1949
|
+
"num_model_requests": S.Int,
|
|
1950
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1951
|
+
nullable: true
|
|
1578
1952
|
}),
|
|
1579
|
-
"
|
|
1953
|
+
"user_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1580
1954
|
nullable: true
|
|
1581
1955
|
}),
|
|
1582
|
-
"
|
|
1583
|
-
nullable: true
|
|
1584
|
-
|
|
1956
|
+
"api_key_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1957
|
+
nullable: true
|
|
1958
|
+
}),
|
|
1959
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1960
|
+
nullable: true
|
|
1585
1961
|
})
|
|
1586
1962
|
}) {}
|
|
1587
|
-
export class
|
|
1588
|
-
|
|
1589
|
-
"object":
|
|
1590
|
-
"
|
|
1591
|
-
"
|
|
1592
|
-
"
|
|
1963
|
+
export class UsageImagesResultObject extends /*#__PURE__*/S.Literal("organization.usage.images.result") {}
|
|
1964
|
+
export class UsageImagesResult extends /*#__PURE__*/S.Struct({
|
|
1965
|
+
"object": UsageImagesResultObject,
|
|
1966
|
+
"images": S.Int,
|
|
1967
|
+
"num_model_requests": S.Int,
|
|
1968
|
+
"source": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1593
1969
|
nullable: true
|
|
1594
1970
|
}),
|
|
1595
|
-
"
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
"
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
"
|
|
1602
|
-
|
|
1603
|
-
})
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
})
|
|
1971
|
+
"size": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1972
|
+
nullable: true
|
|
1973
|
+
}),
|
|
1974
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1975
|
+
nullable: true
|
|
1976
|
+
}),
|
|
1977
|
+
"user_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1978
|
+
nullable: true
|
|
1979
|
+
}),
|
|
1980
|
+
"api_key_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1981
|
+
nullable: true
|
|
1982
|
+
}),
|
|
1983
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1984
|
+
nullable: true
|
|
1985
|
+
})
|
|
1986
|
+
}) {}
|
|
1987
|
+
export class UsageAudioSpeechesResultObject extends /*#__PURE__*/S.Literal("organization.usage.audio_speeches.result") {}
|
|
1988
|
+
export class UsageAudioSpeechesResult extends /*#__PURE__*/S.Struct({
|
|
1989
|
+
"object": UsageAudioSpeechesResultObject,
|
|
1990
|
+
"characters": S.Int,
|
|
1991
|
+
"num_model_requests": S.Int,
|
|
1992
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1993
|
+
nullable: true
|
|
1994
|
+
}),
|
|
1995
|
+
"user_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1996
|
+
nullable: true
|
|
1997
|
+
}),
|
|
1998
|
+
"api_key_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1999
|
+
nullable: true
|
|
2000
|
+
}),
|
|
2001
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2002
|
+
nullable: true
|
|
2003
|
+
})
|
|
2004
|
+
}) {}
|
|
2005
|
+
export class UsageAudioTranscriptionsResultObject extends /*#__PURE__*/S.Literal("organization.usage.audio_transcriptions.result") {}
|
|
2006
|
+
export class UsageAudioTranscriptionsResult extends /*#__PURE__*/S.Struct({
|
|
2007
|
+
"object": UsageAudioTranscriptionsResultObject,
|
|
2008
|
+
"seconds": S.Int,
|
|
2009
|
+
"num_model_requests": S.Int,
|
|
2010
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2011
|
+
nullable: true
|
|
2012
|
+
}),
|
|
2013
|
+
"user_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2014
|
+
nullable: true
|
|
2015
|
+
}),
|
|
2016
|
+
"api_key_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2017
|
+
nullable: true
|
|
2018
|
+
}),
|
|
2019
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2020
|
+
nullable: true
|
|
2021
|
+
})
|
|
2022
|
+
}) {}
|
|
2023
|
+
export class UsageVectorStoresResultObject extends /*#__PURE__*/S.Literal("organization.usage.vector_stores.result") {}
|
|
2024
|
+
export class UsageVectorStoresResult extends /*#__PURE__*/S.Struct({
|
|
2025
|
+
"object": UsageVectorStoresResultObject,
|
|
2026
|
+
"usage_bytes": S.Int,
|
|
2027
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2028
|
+
nullable: true
|
|
2029
|
+
})
|
|
2030
|
+
}) {}
|
|
2031
|
+
export class UsageCodeInterpreterSessionsResultObject extends /*#__PURE__*/S.Literal("organization.usage.code_interpreter_sessions.result") {}
|
|
2032
|
+
export class UsageCodeInterpreterSessionsResult extends /*#__PURE__*/S.Struct({
|
|
2033
|
+
"object": UsageCodeInterpreterSessionsResultObject,
|
|
2034
|
+
"sessions": S.Int,
|
|
2035
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2036
|
+
nullable: true
|
|
2037
|
+
})
|
|
2038
|
+
}) {}
|
|
2039
|
+
export class CostsResultObject extends /*#__PURE__*/S.Literal("organization.costs.result") {}
|
|
2040
|
+
export class CostsResult extends /*#__PURE__*/S.Struct({
|
|
2041
|
+
"object": CostsResultObject,
|
|
2042
|
+
"amount": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
2043
|
+
"value": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
2044
|
+
nullable: true
|
|
2045
|
+
}),
|
|
2046
|
+
"currency": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2047
|
+
nullable: true
|
|
2048
|
+
})
|
|
2049
|
+
}), {
|
|
2050
|
+
nullable: true
|
|
2051
|
+
}),
|
|
2052
|
+
"line_item": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2053
|
+
nullable: true
|
|
2054
|
+
}),
|
|
2055
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2056
|
+
nullable: true
|
|
2057
|
+
})
|
|
2058
|
+
}) {}
|
|
2059
|
+
export class UsageTimeBucket extends /*#__PURE__*/S.Struct({
|
|
2060
|
+
"object": UsageTimeBucketObject,
|
|
2061
|
+
"start_time": S.Int,
|
|
2062
|
+
"end_time": S.Int,
|
|
2063
|
+
"result": /*#__PURE__*/S.Array( /*#__PURE__*/S.Union(UsageCompletionsResult, UsageEmbeddingsResult, UsageModerationsResult, UsageImagesResult, UsageAudioSpeechesResult, UsageAudioTranscriptionsResult, UsageVectorStoresResult, UsageCodeInterpreterSessionsResult, CostsResult))
|
|
2064
|
+
}) {}
|
|
2065
|
+
export class UsageResponse extends /*#__PURE__*/S.Class("UsageResponse")({
|
|
2066
|
+
"object": UsageResponseObject,
|
|
2067
|
+
"data": /*#__PURE__*/S.Array(UsageTimeBucket),
|
|
2068
|
+
"has_more": S.Boolean,
|
|
2069
|
+
"next_page": S.String
|
|
2070
|
+
}) {}
|
|
2071
|
+
export class ListInvitesParams extends /*#__PURE__*/S.Struct({
|
|
2072
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2073
|
+
nullable: true,
|
|
2074
|
+
default: () => 20
|
|
2075
|
+
}),
|
|
2076
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2077
|
+
nullable: true
|
|
2078
|
+
})
|
|
2079
|
+
}) {}
|
|
2080
|
+
export class InviteListResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
2081
|
+
export class InviteObject extends /*#__PURE__*/S.Literal("organization.invite") {}
|
|
2082
|
+
export class InviteRole extends /*#__PURE__*/S.Literal("owner", "reader") {}
|
|
2083
|
+
export class InviteStatus extends /*#__PURE__*/S.Literal("accepted", "expired", "pending") {}
|
|
2084
|
+
export class InviteProjectsRole extends /*#__PURE__*/S.Literal("member", "owner") {}
|
|
2085
|
+
export class Invite extends /*#__PURE__*/S.Struct({
|
|
2086
|
+
"object": InviteObject,
|
|
2087
|
+
"id": S.String,
|
|
2088
|
+
"email": S.String,
|
|
2089
|
+
"role": InviteRole,
|
|
2090
|
+
"status": InviteStatus,
|
|
2091
|
+
"invited_at": S.Int,
|
|
2092
|
+
"expires_at": S.Int,
|
|
2093
|
+
"accepted_at": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2094
|
+
nullable: true
|
|
2095
|
+
}),
|
|
2096
|
+
"projects": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
2097
|
+
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2098
|
+
nullable: true
|
|
2099
|
+
}),
|
|
2100
|
+
"role": /*#__PURE__*/S.optionalWith(InviteProjectsRole, {
|
|
2101
|
+
nullable: true
|
|
2102
|
+
})
|
|
2103
|
+
})), {
|
|
2104
|
+
nullable: true
|
|
2105
|
+
})
|
|
2106
|
+
}) {}
|
|
2107
|
+
export class InviteListResponse extends /*#__PURE__*/S.Class("InviteListResponse")({
|
|
2108
|
+
"object": InviteListResponseObject,
|
|
2109
|
+
"data": /*#__PURE__*/S.Array(Invite),
|
|
2110
|
+
"first_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2111
|
+
nullable: true
|
|
2112
|
+
}),
|
|
2113
|
+
"last_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2114
|
+
nullable: true
|
|
2115
|
+
}),
|
|
2116
|
+
"has_more": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2117
|
+
nullable: true
|
|
2118
|
+
})
|
|
2119
|
+
}) {}
|
|
2120
|
+
export class InviteRequestRole extends /*#__PURE__*/S.Literal("reader", "owner") {}
|
|
2121
|
+
export class InviteRequestProjectsRole extends /*#__PURE__*/S.Literal("member", "owner") {}
|
|
2122
|
+
export class InviteRequest extends /*#__PURE__*/S.Class("InviteRequest")({
|
|
2123
|
+
"email": S.String,
|
|
2124
|
+
"role": InviteRequestRole,
|
|
2125
|
+
"projects": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
2126
|
+
"id": S.String,
|
|
2127
|
+
"role": InviteRequestProjectsRole
|
|
2128
|
+
})), {
|
|
2129
|
+
nullable: true
|
|
2130
|
+
})
|
|
2131
|
+
}) {}
|
|
2132
|
+
export class InviteDeleteResponseObject extends /*#__PURE__*/S.Literal("organization.invite.deleted") {}
|
|
2133
|
+
export class InviteDeleteResponse extends /*#__PURE__*/S.Class("InviteDeleteResponse")({
|
|
2134
|
+
"object": InviteDeleteResponseObject,
|
|
2135
|
+
"id": S.String,
|
|
2136
|
+
"deleted": S.Boolean
|
|
2137
|
+
}) {}
|
|
2138
|
+
export class ListProjectsParams extends /*#__PURE__*/S.Struct({
|
|
2139
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2140
|
+
nullable: true,
|
|
2141
|
+
default: () => 20
|
|
2142
|
+
}),
|
|
2143
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2144
|
+
nullable: true
|
|
2145
|
+
}),
|
|
2146
|
+
"include_archived": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2147
|
+
nullable: true,
|
|
2148
|
+
default: () => false
|
|
2149
|
+
})
|
|
2150
|
+
}) {}
|
|
2151
|
+
export class ProjectListResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
2152
|
+
export class ProjectObject extends /*#__PURE__*/S.Literal("organization.project") {}
|
|
2153
|
+
export class ProjectStatus extends /*#__PURE__*/S.Literal("active", "archived") {}
|
|
2154
|
+
export class Project extends /*#__PURE__*/S.Struct({
|
|
2155
|
+
"id": S.String,
|
|
2156
|
+
"object": ProjectObject,
|
|
2157
|
+
"name": S.String,
|
|
2158
|
+
"created_at": S.Int,
|
|
2159
|
+
"archived_at": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2160
|
+
nullable: true
|
|
2161
|
+
}),
|
|
2162
|
+
"status": ProjectStatus
|
|
2163
|
+
}) {}
|
|
2164
|
+
export class ProjectListResponse extends /*#__PURE__*/S.Class("ProjectListResponse")({
|
|
2165
|
+
"object": ProjectListResponseObject,
|
|
2166
|
+
"data": /*#__PURE__*/S.Array(Project),
|
|
2167
|
+
"first_id": S.String,
|
|
2168
|
+
"last_id": S.String,
|
|
2169
|
+
"has_more": S.Boolean
|
|
2170
|
+
}) {}
|
|
2171
|
+
export class ProjectCreateRequest extends /*#__PURE__*/S.Class("ProjectCreateRequest")({
|
|
2172
|
+
"name": S.String
|
|
2173
|
+
}) {}
|
|
1607
2174
|
export class ProjectUpdateRequest extends /*#__PURE__*/S.Class("ProjectUpdateRequest")({
|
|
1608
2175
|
"name": S.String
|
|
1609
2176
|
}) {}
|
|
@@ -1625,29 +2192,36 @@ export class ListProjectApiKeysParams extends /*#__PURE__*/S.Struct({
|
|
|
1625
2192
|
nullable: true
|
|
1626
2193
|
})
|
|
1627
2194
|
}) {}
|
|
2195
|
+
export class ProjectApiKeyListResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
2196
|
+
export class ProjectApiKeyObject extends /*#__PURE__*/S.Literal("organization.project.api_key") {}
|
|
2197
|
+
export class ProjectApiKeyOwnerType extends /*#__PURE__*/S.Literal("user", "service_account") {}
|
|
2198
|
+
export class ProjectUserObject extends /*#__PURE__*/S.Literal("organization.project.user") {}
|
|
2199
|
+
export class ProjectUserRole extends /*#__PURE__*/S.Literal("owner", "member") {}
|
|
1628
2200
|
export class ProjectUser extends /*#__PURE__*/S.Struct({
|
|
1629
|
-
"object":
|
|
2201
|
+
"object": ProjectUserObject,
|
|
1630
2202
|
"id": S.String,
|
|
1631
2203
|
"name": S.String,
|
|
1632
2204
|
"email": S.String,
|
|
1633
|
-
"role":
|
|
2205
|
+
"role": ProjectUserRole,
|
|
1634
2206
|
"added_at": S.Int
|
|
1635
2207
|
}) {}
|
|
2208
|
+
export class ProjectServiceAccountObject extends /*#__PURE__*/S.Literal("organization.project.service_account") {}
|
|
2209
|
+
export class ProjectServiceAccountRole extends /*#__PURE__*/S.Literal("owner", "member") {}
|
|
1636
2210
|
export class ProjectServiceAccount extends /*#__PURE__*/S.Struct({
|
|
1637
|
-
"object":
|
|
2211
|
+
"object": ProjectServiceAccountObject,
|
|
1638
2212
|
"id": S.String,
|
|
1639
2213
|
"name": S.String,
|
|
1640
|
-
"role":
|
|
2214
|
+
"role": ProjectServiceAccountRole,
|
|
1641
2215
|
"created_at": S.Int
|
|
1642
2216
|
}) {}
|
|
1643
2217
|
export class ProjectApiKey extends /*#__PURE__*/S.Struct({
|
|
1644
|
-
"object":
|
|
2218
|
+
"object": ProjectApiKeyObject,
|
|
1645
2219
|
"redacted_value": S.String,
|
|
1646
2220
|
"name": S.String,
|
|
1647
2221
|
"created_at": S.Int,
|
|
1648
2222
|
"id": S.String,
|
|
1649
2223
|
"owner": /*#__PURE__*/S.Struct({
|
|
1650
|
-
"type": /*#__PURE__*/S.optionalWith(
|
|
2224
|
+
"type": /*#__PURE__*/S.optionalWith(ProjectApiKeyOwnerType, {
|
|
1651
2225
|
nullable: true
|
|
1652
2226
|
}),
|
|
1653
2227
|
"user": /*#__PURE__*/S.optionalWith(ProjectUser, {
|
|
@@ -1658,85 +2232,411 @@ export class ProjectApiKey extends /*#__PURE__*/S.Struct({
|
|
|
1658
2232
|
})
|
|
1659
2233
|
})
|
|
1660
2234
|
}) {}
|
|
1661
|
-
export class ProjectApiKeyListResponse extends /*#__PURE__*/S.Class("ProjectApiKeyListResponse")({
|
|
1662
|
-
"object":
|
|
1663
|
-
"data": /*#__PURE__*/S.Array(ProjectApiKey),
|
|
1664
|
-
"first_id": S.String,
|
|
1665
|
-
"last_id": S.String,
|
|
1666
|
-
"has_more": S.Boolean
|
|
1667
|
-
}) {}
|
|
1668
|
-
export class
|
|
1669
|
-
|
|
1670
|
-
"
|
|
1671
|
-
"
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
2235
|
+
export class ProjectApiKeyListResponse extends /*#__PURE__*/S.Class("ProjectApiKeyListResponse")({
|
|
2236
|
+
"object": ProjectApiKeyListResponseObject,
|
|
2237
|
+
"data": /*#__PURE__*/S.Array(ProjectApiKey),
|
|
2238
|
+
"first_id": S.String,
|
|
2239
|
+
"last_id": S.String,
|
|
2240
|
+
"has_more": S.Boolean
|
|
2241
|
+
}) {}
|
|
2242
|
+
export class ProjectApiKeyDeleteResponseObject extends /*#__PURE__*/S.Literal("organization.project.api_key.deleted") {}
|
|
2243
|
+
export class ProjectApiKeyDeleteResponse extends /*#__PURE__*/S.Class("ProjectApiKeyDeleteResponse")({
|
|
2244
|
+
"object": ProjectApiKeyDeleteResponseObject,
|
|
2245
|
+
"id": S.String,
|
|
2246
|
+
"deleted": S.Boolean
|
|
2247
|
+
}) {}
|
|
2248
|
+
export class ListProjectRateLimitsParams extends /*#__PURE__*/S.Struct({
|
|
2249
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2250
|
+
nullable: true,
|
|
2251
|
+
default: () => 100
|
|
2252
|
+
}),
|
|
2253
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2254
|
+
nullable: true
|
|
2255
|
+
}),
|
|
2256
|
+
"before": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2257
|
+
nullable: true
|
|
2258
|
+
})
|
|
2259
|
+
}) {}
|
|
2260
|
+
export class ProjectRateLimitListResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
2261
|
+
export class ProjectRateLimitObject extends /*#__PURE__*/S.Literal("project.rate_limit") {}
|
|
2262
|
+
export class ProjectRateLimit extends /*#__PURE__*/S.Struct({
|
|
2263
|
+
"object": ProjectRateLimitObject,
|
|
2264
|
+
"id": S.String,
|
|
2265
|
+
"model": S.String,
|
|
2266
|
+
"max_requests_per_1_minute": S.Int,
|
|
2267
|
+
"max_tokens_per_1_minute": S.Int,
|
|
2268
|
+
"max_images_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2269
|
+
nullable: true
|
|
2270
|
+
}),
|
|
2271
|
+
"max_audio_megabytes_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2272
|
+
nullable: true
|
|
2273
|
+
}),
|
|
2274
|
+
"max_requests_per_1_day": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2275
|
+
nullable: true
|
|
2276
|
+
}),
|
|
2277
|
+
"batch_1_day_max_input_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2278
|
+
nullable: true
|
|
2279
|
+
})
|
|
2280
|
+
}) {}
|
|
2281
|
+
export class ProjectRateLimitListResponse extends /*#__PURE__*/S.Class("ProjectRateLimitListResponse")({
|
|
2282
|
+
"object": ProjectRateLimitListResponseObject,
|
|
2283
|
+
"data": /*#__PURE__*/S.Array(ProjectRateLimit),
|
|
2284
|
+
"first_id": S.String,
|
|
2285
|
+
"last_id": S.String,
|
|
2286
|
+
"has_more": S.Boolean
|
|
2287
|
+
}) {}
|
|
2288
|
+
export class ProjectRateLimitUpdateRequest extends /*#__PURE__*/S.Class("ProjectRateLimitUpdateRequest")({
|
|
2289
|
+
"max_requests_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2290
|
+
nullable: true
|
|
2291
|
+
}),
|
|
2292
|
+
"max_tokens_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2293
|
+
nullable: true
|
|
2294
|
+
}),
|
|
2295
|
+
"max_images_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2296
|
+
nullable: true
|
|
2297
|
+
}),
|
|
2298
|
+
"max_audio_megabytes_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2299
|
+
nullable: true
|
|
2300
|
+
}),
|
|
2301
|
+
"max_requests_per_1_day": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2302
|
+
nullable: true
|
|
2303
|
+
}),
|
|
2304
|
+
"batch_1_day_max_input_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2305
|
+
nullable: true
|
|
2306
|
+
})
|
|
2307
|
+
}) {}
|
|
2308
|
+
export class ListProjectServiceAccountsParams extends /*#__PURE__*/S.Struct({
|
|
2309
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2310
|
+
nullable: true,
|
|
2311
|
+
default: () => 20
|
|
2312
|
+
}),
|
|
2313
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2314
|
+
nullable: true
|
|
2315
|
+
})
|
|
2316
|
+
}) {}
|
|
2317
|
+
export class ProjectServiceAccountListResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
2318
|
+
export class ProjectServiceAccountListResponse extends /*#__PURE__*/S.Class("ProjectServiceAccountListResponse")({
|
|
2319
|
+
"object": ProjectServiceAccountListResponseObject,
|
|
2320
|
+
"data": /*#__PURE__*/S.Array(ProjectServiceAccount),
|
|
2321
|
+
"first_id": S.String,
|
|
2322
|
+
"last_id": S.String,
|
|
2323
|
+
"has_more": S.Boolean
|
|
2324
|
+
}) {}
|
|
2325
|
+
export class ProjectServiceAccountCreateRequest extends /*#__PURE__*/S.Class("ProjectServiceAccountCreateRequest")({
|
|
2326
|
+
"name": S.String
|
|
2327
|
+
}) {}
|
|
2328
|
+
export class ProjectServiceAccountCreateResponseObject extends /*#__PURE__*/S.Literal("organization.project.service_account") {}
|
|
2329
|
+
export class ProjectServiceAccountCreateResponseRole extends /*#__PURE__*/S.Literal("member") {}
|
|
2330
|
+
export class ProjectServiceAccountApiKeyObject extends /*#__PURE__*/S.Literal("organization.project.service_account.api_key") {}
|
|
2331
|
+
export class ProjectServiceAccountApiKey extends /*#__PURE__*/S.Struct({
|
|
2332
|
+
"object": ProjectServiceAccountApiKeyObject,
|
|
2333
|
+
"value": S.String,
|
|
2334
|
+
"name": S.String,
|
|
2335
|
+
"created_at": S.Int,
|
|
2336
|
+
"id": S.String
|
|
2337
|
+
}) {}
|
|
2338
|
+
export class ProjectServiceAccountCreateResponse extends /*#__PURE__*/S.Class("ProjectServiceAccountCreateResponse")({
|
|
2339
|
+
"object": ProjectServiceAccountCreateResponseObject,
|
|
2340
|
+
"id": S.String,
|
|
2341
|
+
"name": S.String,
|
|
2342
|
+
"role": ProjectServiceAccountCreateResponseRole,
|
|
2343
|
+
"created_at": S.Int,
|
|
2344
|
+
"api_key": ProjectServiceAccountApiKey
|
|
2345
|
+
}) {}
|
|
2346
|
+
export class ProjectServiceAccountDeleteResponseObject extends /*#__PURE__*/S.Literal("organization.project.service_account.deleted") {}
|
|
2347
|
+
export class ProjectServiceAccountDeleteResponse extends /*#__PURE__*/S.Class("ProjectServiceAccountDeleteResponse")({
|
|
2348
|
+
"object": ProjectServiceAccountDeleteResponseObject,
|
|
2349
|
+
"id": S.String,
|
|
2350
|
+
"deleted": S.Boolean
|
|
2351
|
+
}) {}
|
|
2352
|
+
export class ListProjectUsersParams extends /*#__PURE__*/S.Struct({
|
|
2353
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2354
|
+
nullable: true,
|
|
2355
|
+
default: () => 20
|
|
2356
|
+
}),
|
|
2357
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2358
|
+
nullable: true
|
|
2359
|
+
})
|
|
2360
|
+
}) {}
|
|
2361
|
+
export class ProjectUserListResponse extends /*#__PURE__*/S.Class("ProjectUserListResponse")({
|
|
2362
|
+
"object": S.String,
|
|
2363
|
+
"data": /*#__PURE__*/S.Array(ProjectUser),
|
|
2364
|
+
"first_id": S.String,
|
|
2365
|
+
"last_id": S.String,
|
|
2366
|
+
"has_more": S.Boolean
|
|
2367
|
+
}) {}
|
|
2368
|
+
export class ProjectUserCreateRequestRole extends /*#__PURE__*/S.Literal("owner", "member") {}
|
|
2369
|
+
export class ProjectUserCreateRequest extends /*#__PURE__*/S.Class("ProjectUserCreateRequest")({
|
|
2370
|
+
"user_id": S.String,
|
|
2371
|
+
"role": ProjectUserCreateRequestRole
|
|
2372
|
+
}) {}
|
|
2373
|
+
export class ProjectUserUpdateRequestRole extends /*#__PURE__*/S.Literal("owner", "member") {}
|
|
2374
|
+
export class ProjectUserUpdateRequest extends /*#__PURE__*/S.Class("ProjectUserUpdateRequest")({
|
|
2375
|
+
"role": ProjectUserUpdateRequestRole
|
|
2376
|
+
}) {}
|
|
2377
|
+
export class ProjectUserDeleteResponseObject extends /*#__PURE__*/S.Literal("organization.project.user.deleted") {}
|
|
2378
|
+
export class ProjectUserDeleteResponse extends /*#__PURE__*/S.Class("ProjectUserDeleteResponse")({
|
|
2379
|
+
"object": ProjectUserDeleteResponseObject,
|
|
2380
|
+
"id": S.String,
|
|
2381
|
+
"deleted": S.Boolean
|
|
2382
|
+
}) {}
|
|
2383
|
+
export class UsageAudioSpeechesParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2384
|
+
export class UsageAudioSpeechesParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "user_id", "api_key_id", "model") {}
|
|
2385
|
+
export class UsageAudioSpeechesParams extends /*#__PURE__*/S.Struct({
|
|
2386
|
+
"start_time": S.Int,
|
|
2387
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2388
|
+
nullable: true
|
|
2389
|
+
}),
|
|
2390
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageAudioSpeechesParamsBucketWidth, {
|
|
2391
|
+
nullable: true,
|
|
2392
|
+
default: () => "1d"
|
|
2393
|
+
}),
|
|
2394
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2395
|
+
nullable: true
|
|
2396
|
+
}),
|
|
2397
|
+
"user_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2398
|
+
nullable: true
|
|
2399
|
+
}),
|
|
2400
|
+
"api_key_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2401
|
+
nullable: true
|
|
2402
|
+
}),
|
|
2403
|
+
"models": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2404
|
+
nullable: true
|
|
2405
|
+
}),
|
|
2406
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageAudioSpeechesParamsGroupBy), {
|
|
2407
|
+
nullable: true
|
|
2408
|
+
}),
|
|
2409
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2410
|
+
nullable: true
|
|
2411
|
+
}),
|
|
2412
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2413
|
+
nullable: true
|
|
2414
|
+
})
|
|
2415
|
+
}) {}
|
|
2416
|
+
export class UsageAudioTranscriptionsParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2417
|
+
export class UsageAudioTranscriptionsParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "user_id", "api_key_id", "model") {}
|
|
2418
|
+
export class UsageAudioTranscriptionsParams extends /*#__PURE__*/S.Struct({
|
|
2419
|
+
"start_time": S.Int,
|
|
2420
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2421
|
+
nullable: true
|
|
2422
|
+
}),
|
|
2423
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageAudioTranscriptionsParamsBucketWidth, {
|
|
2424
|
+
nullable: true,
|
|
2425
|
+
default: () => "1d"
|
|
2426
|
+
}),
|
|
2427
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2428
|
+
nullable: true
|
|
2429
|
+
}),
|
|
2430
|
+
"user_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2431
|
+
nullable: true
|
|
2432
|
+
}),
|
|
2433
|
+
"api_key_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2434
|
+
nullable: true
|
|
2435
|
+
}),
|
|
2436
|
+
"models": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2437
|
+
nullable: true
|
|
2438
|
+
}),
|
|
2439
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageAudioTranscriptionsParamsGroupBy), {
|
|
2440
|
+
nullable: true
|
|
2441
|
+
}),
|
|
2442
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2443
|
+
nullable: true
|
|
2444
|
+
}),
|
|
2445
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2446
|
+
nullable: true
|
|
2447
|
+
})
|
|
2448
|
+
}) {}
|
|
2449
|
+
export class UsageCodeInterpreterSessionsParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2450
|
+
export class UsageCodeInterpreterSessionsParamsGroupBy extends /*#__PURE__*/S.Literal("project_id") {}
|
|
2451
|
+
export class UsageCodeInterpreterSessionsParams extends /*#__PURE__*/S.Struct({
|
|
2452
|
+
"start_time": S.Int,
|
|
2453
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2454
|
+
nullable: true
|
|
2455
|
+
}),
|
|
2456
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageCodeInterpreterSessionsParamsBucketWidth, {
|
|
2457
|
+
nullable: true,
|
|
2458
|
+
default: () => "1d"
|
|
2459
|
+
}),
|
|
2460
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2461
|
+
nullable: true
|
|
2462
|
+
}),
|
|
2463
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageCodeInterpreterSessionsParamsGroupBy), {
|
|
2464
|
+
nullable: true
|
|
2465
|
+
}),
|
|
2466
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2467
|
+
nullable: true
|
|
2468
|
+
}),
|
|
2469
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2470
|
+
nullable: true
|
|
2471
|
+
})
|
|
2472
|
+
}) {}
|
|
2473
|
+
export class UsageCompletionsParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2474
|
+
export class UsageCompletionsParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "user_id", "api_key_id", "model", "batch") {}
|
|
2475
|
+
export class UsageCompletionsParams extends /*#__PURE__*/S.Struct({
|
|
2476
|
+
"start_time": S.Int,
|
|
2477
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2478
|
+
nullable: true
|
|
2479
|
+
}),
|
|
2480
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageCompletionsParamsBucketWidth, {
|
|
2481
|
+
nullable: true,
|
|
2482
|
+
default: () => "1d"
|
|
2483
|
+
}),
|
|
2484
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2485
|
+
nullable: true
|
|
2486
|
+
}),
|
|
2487
|
+
"user_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2488
|
+
nullable: true
|
|
2489
|
+
}),
|
|
2490
|
+
"api_key_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2491
|
+
nullable: true
|
|
2492
|
+
}),
|
|
2493
|
+
"models": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2494
|
+
nullable: true
|
|
2495
|
+
}),
|
|
2496
|
+
"batch": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2497
|
+
nullable: true
|
|
2498
|
+
}),
|
|
2499
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageCompletionsParamsGroupBy), {
|
|
2500
|
+
nullable: true
|
|
2501
|
+
}),
|
|
2502
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2503
|
+
nullable: true
|
|
2504
|
+
}),
|
|
2505
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2506
|
+
nullable: true
|
|
2507
|
+
})
|
|
2508
|
+
}) {}
|
|
2509
|
+
export class UsageEmbeddingsParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2510
|
+
export class UsageEmbeddingsParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "user_id", "api_key_id", "model") {}
|
|
2511
|
+
export class UsageEmbeddingsParams extends /*#__PURE__*/S.Struct({
|
|
2512
|
+
"start_time": S.Int,
|
|
2513
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2514
|
+
nullable: true
|
|
2515
|
+
}),
|
|
2516
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageEmbeddingsParamsBucketWidth, {
|
|
2517
|
+
nullable: true,
|
|
2518
|
+
default: () => "1d"
|
|
2519
|
+
}),
|
|
2520
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2521
|
+
nullable: true
|
|
2522
|
+
}),
|
|
2523
|
+
"user_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2524
|
+
nullable: true
|
|
2525
|
+
}),
|
|
2526
|
+
"api_key_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2527
|
+
nullable: true
|
|
2528
|
+
}),
|
|
2529
|
+
"models": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2530
|
+
nullable: true
|
|
2531
|
+
}),
|
|
2532
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageEmbeddingsParamsGroupBy), {
|
|
2533
|
+
nullable: true
|
|
2534
|
+
}),
|
|
2535
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2536
|
+
nullable: true
|
|
2537
|
+
}),
|
|
2538
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2539
|
+
nullable: true
|
|
2540
|
+
})
|
|
2541
|
+
}) {}
|
|
2542
|
+
export class UsageImagesParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2543
|
+
export class UsageImagesParamsSources extends /*#__PURE__*/S.Literal("image.generation", "image.edit", "image.variation") {}
|
|
2544
|
+
export class UsageImagesParamsSizes extends /*#__PURE__*/S.Literal("256x256", "512x512", "1024x1024", "1792x1792", "1024x1792") {}
|
|
2545
|
+
export class UsageImagesParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "user_id", "api_key_id", "model", "size", "source") {}
|
|
2546
|
+
export class UsageImagesParams extends /*#__PURE__*/S.Struct({
|
|
2547
|
+
"start_time": S.Int,
|
|
2548
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2549
|
+
nullable: true
|
|
2550
|
+
}),
|
|
2551
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageImagesParamsBucketWidth, {
|
|
2552
|
+
nullable: true,
|
|
2553
|
+
default: () => "1d"
|
|
2554
|
+
}),
|
|
2555
|
+
"sources": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageImagesParamsSources), {
|
|
2556
|
+
nullable: true
|
|
2557
|
+
}),
|
|
2558
|
+
"sizes": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageImagesParamsSizes), {
|
|
2559
|
+
nullable: true
|
|
2560
|
+
}),
|
|
2561
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2562
|
+
nullable: true
|
|
2563
|
+
}),
|
|
2564
|
+
"user_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2565
|
+
nullable: true
|
|
2566
|
+
}),
|
|
2567
|
+
"api_key_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2568
|
+
nullable: true
|
|
2569
|
+
}),
|
|
2570
|
+
"models": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2571
|
+
nullable: true
|
|
2572
|
+
}),
|
|
2573
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageImagesParamsGroupBy), {
|
|
2574
|
+
nullable: true
|
|
2575
|
+
}),
|
|
2576
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2577
|
+
nullable: true
|
|
2578
|
+
}),
|
|
2579
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2580
|
+
nullable: true
|
|
2581
|
+
})
|
|
2582
|
+
}) {}
|
|
2583
|
+
export class UsageModerationsParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2584
|
+
export class UsageModerationsParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "user_id", "api_key_id", "model") {}
|
|
2585
|
+
export class UsageModerationsParams extends /*#__PURE__*/S.Struct({
|
|
2586
|
+
"start_time": S.Int,
|
|
2587
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2588
|
+
nullable: true
|
|
2589
|
+
}),
|
|
2590
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageModerationsParamsBucketWidth, {
|
|
1675
2591
|
nullable: true,
|
|
1676
|
-
default: () =>
|
|
2592
|
+
default: () => "1d"
|
|
1677
2593
|
}),
|
|
1678
|
-
"
|
|
2594
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2595
|
+
nullable: true
|
|
2596
|
+
}),
|
|
2597
|
+
"user_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2598
|
+
nullable: true
|
|
2599
|
+
}),
|
|
2600
|
+
"api_key_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2601
|
+
nullable: true
|
|
2602
|
+
}),
|
|
2603
|
+
"models": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2604
|
+
nullable: true
|
|
2605
|
+
}),
|
|
2606
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageModerationsParamsGroupBy), {
|
|
2607
|
+
nullable: true
|
|
2608
|
+
}),
|
|
2609
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2610
|
+
nullable: true
|
|
2611
|
+
}),
|
|
2612
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1679
2613
|
nullable: true
|
|
1680
2614
|
})
|
|
1681
2615
|
}) {}
|
|
1682
|
-
export class
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
"
|
|
1686
|
-
"
|
|
1687
|
-
|
|
1688
|
-
})
|
|
1689
|
-
|
|
1690
|
-
"name": S.String
|
|
1691
|
-
}) {}
|
|
1692
|
-
export class ProjectServiceAccountApiKey extends /*#__PURE__*/S.Struct({
|
|
1693
|
-
"object": /*#__PURE__*/S.Literal("organization.project.service_account.api_key"),
|
|
1694
|
-
"value": S.String,
|
|
1695
|
-
"name": S.String,
|
|
1696
|
-
"created_at": S.Int,
|
|
1697
|
-
"id": S.String
|
|
1698
|
-
}) {}
|
|
1699
|
-
export class ProjectServiceAccountCreateResponse extends /*#__PURE__*/S.Class("ProjectServiceAccountCreateResponse")({
|
|
1700
|
-
"object": /*#__PURE__*/S.Literal("organization.project.service_account"),
|
|
1701
|
-
"id": S.String,
|
|
1702
|
-
"name": S.String,
|
|
1703
|
-
"role": /*#__PURE__*/S.Literal("member"),
|
|
1704
|
-
"created_at": S.Int,
|
|
1705
|
-
"api_key": ProjectServiceAccountApiKey
|
|
1706
|
-
}) {}
|
|
1707
|
-
export class ProjectServiceAccountDeleteResponse extends /*#__PURE__*/S.Class("ProjectServiceAccountDeleteResponse")({
|
|
1708
|
-
"object": /*#__PURE__*/S.Literal("organization.project.service_account.deleted"),
|
|
1709
|
-
"id": S.String,
|
|
1710
|
-
"deleted": S.Boolean
|
|
1711
|
-
}) {}
|
|
1712
|
-
export class ListProjectUsersParams extends /*#__PURE__*/S.Struct({
|
|
1713
|
-
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2616
|
+
export class UsageVectorStoresParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2617
|
+
export class UsageVectorStoresParamsGroupBy extends /*#__PURE__*/S.Literal("project_id") {}
|
|
2618
|
+
export class UsageVectorStoresParams extends /*#__PURE__*/S.Struct({
|
|
2619
|
+
"start_time": S.Int,
|
|
2620
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2621
|
+
nullable: true
|
|
2622
|
+
}),
|
|
2623
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageVectorStoresParamsBucketWidth, {
|
|
1714
2624
|
nullable: true,
|
|
1715
|
-
default: () =>
|
|
2625
|
+
default: () => "1d"
|
|
1716
2626
|
}),
|
|
1717
|
-
"
|
|
2627
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2628
|
+
nullable: true
|
|
2629
|
+
}),
|
|
2630
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageVectorStoresParamsGroupBy), {
|
|
2631
|
+
nullable: true
|
|
2632
|
+
}),
|
|
2633
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2634
|
+
nullable: true
|
|
2635
|
+
}),
|
|
2636
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1718
2637
|
nullable: true
|
|
1719
2638
|
})
|
|
1720
2639
|
}) {}
|
|
1721
|
-
export class ProjectUserListResponse extends /*#__PURE__*/S.Class("ProjectUserListResponse")({
|
|
1722
|
-
"object": S.String,
|
|
1723
|
-
"data": /*#__PURE__*/S.Array(ProjectUser),
|
|
1724
|
-
"first_id": S.String,
|
|
1725
|
-
"last_id": S.String,
|
|
1726
|
-
"has_more": S.Boolean
|
|
1727
|
-
}) {}
|
|
1728
|
-
export class ProjectUserCreateRequest extends /*#__PURE__*/S.Class("ProjectUserCreateRequest")({
|
|
1729
|
-
"user_id": S.String,
|
|
1730
|
-
"role": /*#__PURE__*/S.Literal("owner", "member")
|
|
1731
|
-
}) {}
|
|
1732
|
-
export class ProjectUserUpdateRequest extends /*#__PURE__*/S.Class("ProjectUserUpdateRequest")({
|
|
1733
|
-
"role": /*#__PURE__*/S.Literal("owner", "member")
|
|
1734
|
-
}) {}
|
|
1735
|
-
export class ProjectUserDeleteResponse extends /*#__PURE__*/S.Class("ProjectUserDeleteResponse")({
|
|
1736
|
-
"object": /*#__PURE__*/S.Literal("organization.project.user.deleted"),
|
|
1737
|
-
"id": S.String,
|
|
1738
|
-
"deleted": S.Boolean
|
|
1739
|
-
}) {}
|
|
1740
2640
|
export class ListUsersParams extends /*#__PURE__*/S.Struct({
|
|
1741
2641
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1742
2642
|
nullable: true,
|
|
@@ -1746,58 +2646,226 @@ export class ListUsersParams extends /*#__PURE__*/S.Struct({
|
|
|
1746
2646
|
nullable: true
|
|
1747
2647
|
})
|
|
1748
2648
|
}) {}
|
|
2649
|
+
export class UserListResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
2650
|
+
export class UserObject extends /*#__PURE__*/S.Literal("organization.user") {}
|
|
2651
|
+
export class UserRole extends /*#__PURE__*/S.Literal("owner", "reader") {}
|
|
1749
2652
|
export class User extends /*#__PURE__*/S.Struct({
|
|
1750
|
-
"object":
|
|
2653
|
+
"object": UserObject,
|
|
1751
2654
|
"id": S.String,
|
|
1752
2655
|
"name": S.String,
|
|
1753
2656
|
"email": S.String,
|
|
1754
|
-
"role":
|
|
2657
|
+
"role": UserRole,
|
|
1755
2658
|
"added_at": S.Int
|
|
1756
2659
|
}) {}
|
|
1757
2660
|
export class UserListResponse extends /*#__PURE__*/S.Class("UserListResponse")({
|
|
1758
|
-
"object":
|
|
2661
|
+
"object": UserListResponseObject,
|
|
1759
2662
|
"data": /*#__PURE__*/S.Array(User),
|
|
1760
2663
|
"first_id": S.String,
|
|
1761
2664
|
"last_id": S.String,
|
|
1762
2665
|
"has_more": S.Boolean
|
|
1763
2666
|
}) {}
|
|
2667
|
+
export class UserRoleUpdateRequestRole extends /*#__PURE__*/S.Literal("owner", "reader") {}
|
|
1764
2668
|
export class UserRoleUpdateRequest extends /*#__PURE__*/S.Class("UserRoleUpdateRequest")({
|
|
1765
|
-
"role":
|
|
2669
|
+
"role": UserRoleUpdateRequestRole
|
|
1766
2670
|
}) {}
|
|
2671
|
+
export class UserDeleteResponseObject extends /*#__PURE__*/S.Literal("organization.user.deleted") {}
|
|
1767
2672
|
export class UserDeleteResponse extends /*#__PURE__*/S.Class("UserDeleteResponse")({
|
|
1768
|
-
"object":
|
|
2673
|
+
"object": UserDeleteResponseObject,
|
|
1769
2674
|
"id": S.String,
|
|
1770
2675
|
"deleted": S.Boolean
|
|
1771
2676
|
}) {}
|
|
2677
|
+
export class RealtimeSessionCreateRequestModel extends /*#__PURE__*/S.Literal("gpt-4o-realtime-preview", "gpt-4o-realtime-preview-2024-10-01", "gpt-4o-realtime-preview-2024-12-17", "gpt-4o-mini-realtime-preview", "gpt-4o-mini-realtime-preview-2024-12-17") {}
|
|
2678
|
+
export class RealtimeSessionCreateRequestVoice extends /*#__PURE__*/S.Literal("alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse") {}
|
|
2679
|
+
export class RealtimeSessionCreateRequestInputAudioFormat extends /*#__PURE__*/S.Literal("pcm16", "g711_ulaw", "g711_alaw") {}
|
|
2680
|
+
export class RealtimeSessionCreateRequestOutputAudioFormat extends /*#__PURE__*/S.Literal("pcm16", "g711_ulaw", "g711_alaw") {}
|
|
2681
|
+
export class RealtimeSessionCreateRequestToolsType extends /*#__PURE__*/S.Literal("function") {}
|
|
2682
|
+
export class RealtimeSessionCreateRequestMaxResponseOutputTokens extends /*#__PURE__*/S.Literal("inf") {}
|
|
2683
|
+
export class RealtimeSessionCreateRequest extends /*#__PURE__*/S.Class("RealtimeSessionCreateRequest")({
|
|
2684
|
+
"model": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateRequestModel, {
|
|
2685
|
+
nullable: true
|
|
2686
|
+
}),
|
|
2687
|
+
"instructions": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2688
|
+
nullable: true
|
|
2689
|
+
}),
|
|
2690
|
+
"voice": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateRequestVoice, {
|
|
2691
|
+
nullable: true
|
|
2692
|
+
}),
|
|
2693
|
+
"input_audio_format": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateRequestInputAudioFormat, {
|
|
2694
|
+
nullable: true
|
|
2695
|
+
}),
|
|
2696
|
+
"output_audio_format": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateRequestOutputAudioFormat, {
|
|
2697
|
+
nullable: true
|
|
2698
|
+
}),
|
|
2699
|
+
"input_audio_transcription": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
2700
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2701
|
+
nullable: true
|
|
2702
|
+
})
|
|
2703
|
+
}), {
|
|
2704
|
+
nullable: true
|
|
2705
|
+
}),
|
|
2706
|
+
"turn_detection": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
2707
|
+
"type": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2708
|
+
nullable: true
|
|
2709
|
+
}),
|
|
2710
|
+
"threshold": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
2711
|
+
nullable: true
|
|
2712
|
+
}),
|
|
2713
|
+
"prefix_padding_ms": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2714
|
+
nullable: true
|
|
2715
|
+
}),
|
|
2716
|
+
"silence_duration_ms": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2717
|
+
nullable: true
|
|
2718
|
+
}),
|
|
2719
|
+
"create_response": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2720
|
+
nullable: true,
|
|
2721
|
+
default: () => true
|
|
2722
|
+
})
|
|
2723
|
+
}), {
|
|
2724
|
+
nullable: true
|
|
2725
|
+
}),
|
|
2726
|
+
"tools": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
2727
|
+
"type": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateRequestToolsType, {
|
|
2728
|
+
nullable: true
|
|
2729
|
+
}),
|
|
2730
|
+
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2731
|
+
nullable: true
|
|
2732
|
+
}),
|
|
2733
|
+
"description": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2734
|
+
nullable: true
|
|
2735
|
+
}),
|
|
2736
|
+
"parameters": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Record({
|
|
2737
|
+
key: S.String,
|
|
2738
|
+
value: S.Unknown
|
|
2739
|
+
}), {
|
|
2740
|
+
nullable: true
|
|
2741
|
+
})
|
|
2742
|
+
})), {
|
|
2743
|
+
nullable: true
|
|
2744
|
+
}),
|
|
2745
|
+
"tool_choice": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2746
|
+
nullable: true
|
|
2747
|
+
}),
|
|
2748
|
+
"temperature": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
2749
|
+
nullable: true
|
|
2750
|
+
}),
|
|
2751
|
+
"max_response_output_tokens": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.Int, RealtimeSessionCreateRequestMaxResponseOutputTokens), {
|
|
2752
|
+
nullable: true
|
|
2753
|
+
})
|
|
2754
|
+
}) {}
|
|
2755
|
+
export class RealtimeSessionCreateResponseVoice extends /*#__PURE__*/S.Literal("alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse") {}
|
|
2756
|
+
export class RealtimeSessionCreateResponseToolsType extends /*#__PURE__*/S.Literal("function") {}
|
|
2757
|
+
export class RealtimeSessionCreateResponseMaxResponseOutputTokens extends /*#__PURE__*/S.Literal("inf") {}
|
|
2758
|
+
export class RealtimeSessionCreateResponse extends /*#__PURE__*/S.Class("RealtimeSessionCreateResponse")({
|
|
2759
|
+
"client_secret": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
2760
|
+
"value": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2761
|
+
nullable: true
|
|
2762
|
+
}),
|
|
2763
|
+
"expires_at": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2764
|
+
nullable: true
|
|
2765
|
+
})
|
|
2766
|
+
}), {
|
|
2767
|
+
nullable: true
|
|
2768
|
+
}),
|
|
2769
|
+
"instructions": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2770
|
+
nullable: true
|
|
2771
|
+
}),
|
|
2772
|
+
"voice": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateResponseVoice, {
|
|
2773
|
+
nullable: true
|
|
2774
|
+
}),
|
|
2775
|
+
"input_audio_format": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2776
|
+
nullable: true
|
|
2777
|
+
}),
|
|
2778
|
+
"output_audio_format": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2779
|
+
nullable: true
|
|
2780
|
+
}),
|
|
2781
|
+
"input_audio_transcription": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
2782
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2783
|
+
nullable: true
|
|
2784
|
+
})
|
|
2785
|
+
}), {
|
|
2786
|
+
nullable: true
|
|
2787
|
+
}),
|
|
2788
|
+
"turn_detection": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
2789
|
+
"type": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2790
|
+
nullable: true
|
|
2791
|
+
}),
|
|
2792
|
+
"threshold": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
2793
|
+
nullable: true
|
|
2794
|
+
}),
|
|
2795
|
+
"prefix_padding_ms": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2796
|
+
nullable: true
|
|
2797
|
+
}),
|
|
2798
|
+
"silence_duration_ms": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2799
|
+
nullable: true
|
|
2800
|
+
})
|
|
2801
|
+
}), {
|
|
2802
|
+
nullable: true
|
|
2803
|
+
}),
|
|
2804
|
+
"tools": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
2805
|
+
"type": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateResponseToolsType, {
|
|
2806
|
+
nullable: true
|
|
2807
|
+
}),
|
|
2808
|
+
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2809
|
+
nullable: true
|
|
2810
|
+
}),
|
|
2811
|
+
"description": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2812
|
+
nullable: true
|
|
2813
|
+
}),
|
|
2814
|
+
"parameters": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Record({
|
|
2815
|
+
key: S.String,
|
|
2816
|
+
value: S.Unknown
|
|
2817
|
+
}), {
|
|
2818
|
+
nullable: true
|
|
2819
|
+
})
|
|
2820
|
+
})), {
|
|
2821
|
+
nullable: true
|
|
2822
|
+
}),
|
|
2823
|
+
"tool_choice": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2824
|
+
nullable: true
|
|
2825
|
+
}),
|
|
2826
|
+
"temperature": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
2827
|
+
nullable: true
|
|
2828
|
+
}),
|
|
2829
|
+
"max_response_output_tokens": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.Int, RealtimeSessionCreateResponseMaxResponseOutputTokens), {
|
|
2830
|
+
nullable: true
|
|
2831
|
+
})
|
|
2832
|
+
}) {}
|
|
2833
|
+
export class CreateMessageRequestRole extends /*#__PURE__*/S.Literal("user", "assistant") {}
|
|
2834
|
+
export class MessageContentImageFileObjectType extends /*#__PURE__*/S.Literal("image_file") {}
|
|
2835
|
+
export class MessageContentImageFileObjectImageFileDetail extends /*#__PURE__*/S.Literal("auto", "low", "high") {}
|
|
1772
2836
|
export class MessageContentImageFileObject extends /*#__PURE__*/S.Struct({
|
|
1773
|
-
"type":
|
|
2837
|
+
"type": MessageContentImageFileObjectType,
|
|
1774
2838
|
"image_file": /*#__PURE__*/S.Struct({
|
|
1775
2839
|
"file_id": S.String,
|
|
1776
|
-
"detail": /*#__PURE__*/S.optionalWith(
|
|
2840
|
+
"detail": /*#__PURE__*/S.optionalWith(MessageContentImageFileObjectImageFileDetail, {
|
|
1777
2841
|
nullable: true,
|
|
1778
2842
|
default: () => "auto"
|
|
1779
2843
|
})
|
|
1780
2844
|
})
|
|
1781
2845
|
}) {}
|
|
2846
|
+
export class MessageContentImageUrlObjectType extends /*#__PURE__*/S.Literal("image_url") {}
|
|
2847
|
+
export class MessageContentImageUrlObjectImageUrlDetail extends /*#__PURE__*/S.Literal("auto", "low", "high") {}
|
|
1782
2848
|
export class MessageContentImageUrlObject extends /*#__PURE__*/S.Struct({
|
|
1783
|
-
"type":
|
|
2849
|
+
"type": MessageContentImageUrlObjectType,
|
|
1784
2850
|
"image_url": /*#__PURE__*/S.Struct({
|
|
1785
2851
|
"url": S.String,
|
|
1786
|
-
"detail": /*#__PURE__*/S.optionalWith(
|
|
2852
|
+
"detail": /*#__PURE__*/S.optionalWith(MessageContentImageUrlObjectImageUrlDetail, {
|
|
1787
2853
|
nullable: true,
|
|
1788
2854
|
default: () => "auto"
|
|
1789
2855
|
})
|
|
1790
2856
|
})
|
|
1791
2857
|
}) {}
|
|
2858
|
+
export class MessageRequestContentTextObjectType extends /*#__PURE__*/S.Literal("text") {}
|
|
1792
2859
|
export class MessageRequestContentTextObject extends /*#__PURE__*/S.Struct({
|
|
1793
|
-
"type":
|
|
2860
|
+
"type": MessageRequestContentTextObjectType,
|
|
1794
2861
|
"text": S.String
|
|
1795
2862
|
}) {}
|
|
2863
|
+
export class AssistantToolsFileSearchTypeOnlyType extends /*#__PURE__*/S.Literal("file_search") {}
|
|
1796
2864
|
export class AssistantToolsFileSearchTypeOnly extends /*#__PURE__*/S.Struct({
|
|
1797
|
-
"type":
|
|
2865
|
+
"type": AssistantToolsFileSearchTypeOnlyType
|
|
1798
2866
|
}) {}
|
|
1799
2867
|
export class CreateMessageRequest extends /*#__PURE__*/S.Struct({
|
|
1800
|
-
"role":
|
|
2868
|
+
"role": CreateMessageRequestRole,
|
|
1801
2869
|
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.NonEmptyArray( /*#__PURE__*/S.Union(MessageContentImageFileObject, MessageContentImageUrlObject, MessageRequestContentTextObject))),
|
|
1802
2870
|
"attachments": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
1803
2871
|
"file_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -1816,6 +2884,7 @@ export class CreateMessageRequest extends /*#__PURE__*/S.Struct({
|
|
|
1816
2884
|
nullable: true
|
|
1817
2885
|
})
|
|
1818
2886
|
}) {}
|
|
2887
|
+
export class CreateThreadRequestToolResourcesFileSearchVectorStoresChunkingStrategyType extends /*#__PURE__*/S.Literal("static") {}
|
|
1819
2888
|
export class CreateThreadRequest extends /*#__PURE__*/S.Class("CreateThreadRequest")({
|
|
1820
2889
|
"messages": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(CreateMessageRequest), {
|
|
1821
2890
|
nullable: true
|
|
@@ -1865,9 +2934,10 @@ export class CreateThreadRequest extends /*#__PURE__*/S.Class("CreateThreadReque
|
|
|
1865
2934
|
nullable: true
|
|
1866
2935
|
})
|
|
1867
2936
|
}) {}
|
|
2937
|
+
export class ThreadObjectObject extends /*#__PURE__*/S.Literal("thread") {}
|
|
1868
2938
|
export class ThreadObject extends /*#__PURE__*/S.Class("ThreadObject")({
|
|
1869
2939
|
"id": S.String,
|
|
1870
|
-
"object":
|
|
2940
|
+
"object": ThreadObjectObject,
|
|
1871
2941
|
"created_at": S.Int,
|
|
1872
2942
|
"tool_resources": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
1873
2943
|
"code_interpreter": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
@@ -1891,14 +2961,17 @@ export class ThreadObject extends /*#__PURE__*/S.Class("ThreadObject")({
|
|
|
1891
2961
|
value: S.Unknown
|
|
1892
2962
|
}))
|
|
1893
2963
|
}) {}
|
|
2964
|
+
export class CreateThreadAndRunRequestModel extends /*#__PURE__*/S.Literal("gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-turbo-preview", "gpt-4-1106-preview", "gpt-4-vision-preview", "gpt-4", "gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613") {}
|
|
2965
|
+
export class TruncationObjectType extends /*#__PURE__*/S.Literal("auto", "last_messages") {}
|
|
1894
2966
|
export class TruncationObject extends /*#__PURE__*/S.Struct({
|
|
1895
|
-
"type":
|
|
2967
|
+
"type": TruncationObjectType,
|
|
1896
2968
|
"last_messages": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1)), {
|
|
1897
2969
|
nullable: true
|
|
1898
2970
|
})
|
|
1899
2971
|
}) {}
|
|
2972
|
+
export class AssistantsNamedToolChoiceType extends /*#__PURE__*/S.Literal("function", "code_interpreter", "file_search") {}
|
|
1900
2973
|
export class AssistantsNamedToolChoice extends /*#__PURE__*/S.Struct({
|
|
1901
|
-
"type":
|
|
2974
|
+
"type": AssistantsNamedToolChoiceType,
|
|
1902
2975
|
"function": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1903
2976
|
"name": S.String
|
|
1904
2977
|
}), {
|
|
@@ -1911,7 +2984,7 @@ export class CreateThreadAndRunRequest extends /*#__PURE__*/S.Class("CreateThrea
|
|
|
1911
2984
|
"thread": /*#__PURE__*/S.optionalWith(CreateThreadRequest, {
|
|
1912
2985
|
nullable: true
|
|
1913
2986
|
}),
|
|
1914
|
-
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String,
|
|
2987
|
+
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String, CreateThreadAndRunRequestModel), {
|
|
1915
2988
|
nullable: true
|
|
1916
2989
|
}),
|
|
1917
2990
|
"instructions": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -1976,14 +3049,20 @@ export class CreateThreadAndRunRequest extends /*#__PURE__*/S.Class("CreateThrea
|
|
|
1976
3049
|
nullable: true
|
|
1977
3050
|
})
|
|
1978
3051
|
}) {}
|
|
3052
|
+
export class RunObjectObject extends /*#__PURE__*/S.Literal("thread.run") {}
|
|
3053
|
+
export class RunObjectStatus extends /*#__PURE__*/S.Literal("queued", "in_progress", "requires_action", "cancelling", "cancelled", "failed", "completed", "incomplete", "expired") {}
|
|
3054
|
+
export class RunObjectRequiredActionType extends /*#__PURE__*/S.Literal("submit_tool_outputs") {}
|
|
3055
|
+
export class RunToolCallObjectType extends /*#__PURE__*/S.Literal("function") {}
|
|
1979
3056
|
export class RunToolCallObject extends /*#__PURE__*/S.Struct({
|
|
1980
3057
|
"id": S.String,
|
|
1981
|
-
"type":
|
|
3058
|
+
"type": RunToolCallObjectType,
|
|
1982
3059
|
"function": /*#__PURE__*/S.Struct({
|
|
1983
3060
|
"name": S.String,
|
|
1984
3061
|
"arguments": S.String
|
|
1985
3062
|
})
|
|
1986
3063
|
}) {}
|
|
3064
|
+
export class RunObjectLastErrorCode extends /*#__PURE__*/S.Literal("server_error", "rate_limit_exceeded", "invalid_prompt") {}
|
|
3065
|
+
export class RunObjectIncompleteDetailsReason extends /*#__PURE__*/S.Literal("max_completion_tokens", "max_prompt_tokens") {}
|
|
1987
3066
|
export class RunCompletionUsage extends /*#__PURE__*/S.Struct({
|
|
1988
3067
|
"completion_tokens": S.Int,
|
|
1989
3068
|
"prompt_tokens": S.Int,
|
|
@@ -1991,19 +3070,19 @@ export class RunCompletionUsage extends /*#__PURE__*/S.Struct({
|
|
|
1991
3070
|
}) {}
|
|
1992
3071
|
export class RunObject extends /*#__PURE__*/S.Class("RunObject")({
|
|
1993
3072
|
"id": S.String,
|
|
1994
|
-
"object":
|
|
3073
|
+
"object": RunObjectObject,
|
|
1995
3074
|
"created_at": S.Int,
|
|
1996
3075
|
"thread_id": S.String,
|
|
1997
3076
|
"assistant_id": S.String,
|
|
1998
|
-
"status":
|
|
3077
|
+
"status": RunObjectStatus,
|
|
1999
3078
|
"required_action": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2000
|
-
"type":
|
|
3079
|
+
"type": RunObjectRequiredActionType,
|
|
2001
3080
|
"submit_tool_outputs": /*#__PURE__*/S.Struct({
|
|
2002
3081
|
"tool_calls": /*#__PURE__*/S.Array(RunToolCallObject)
|
|
2003
3082
|
})
|
|
2004
3083
|
})),
|
|
2005
3084
|
"last_error": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2006
|
-
"code":
|
|
3085
|
+
"code": RunObjectLastErrorCode,
|
|
2007
3086
|
"message": S.String
|
|
2008
3087
|
})),
|
|
2009
3088
|
"expires_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
@@ -2012,7 +3091,7 @@ export class RunObject extends /*#__PURE__*/S.Class("RunObject")({
|
|
|
2012
3091
|
"failed_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
2013
3092
|
"completed_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
2014
3093
|
"incomplete_details": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2015
|
-
"reason": /*#__PURE__*/S.optionalWith(
|
|
3094
|
+
"reason": /*#__PURE__*/S.optionalWith(RunObjectIncompleteDetailsReason, {
|
|
2016
3095
|
nullable: true
|
|
2017
3096
|
})
|
|
2018
3097
|
})),
|
|
@@ -2064,17 +3143,19 @@ export class ModifyThreadRequest extends /*#__PURE__*/S.Class("ModifyThreadReque
|
|
|
2064
3143
|
nullable: true
|
|
2065
3144
|
})
|
|
2066
3145
|
}) {}
|
|
3146
|
+
export class DeleteThreadResponseObject extends /*#__PURE__*/S.Literal("thread.deleted") {}
|
|
2067
3147
|
export class DeleteThreadResponse extends /*#__PURE__*/S.Class("DeleteThreadResponse")({
|
|
2068
3148
|
"id": S.String,
|
|
2069
3149
|
"deleted": S.Boolean,
|
|
2070
|
-
"object":
|
|
3150
|
+
"object": DeleteThreadResponseObject
|
|
2071
3151
|
}) {}
|
|
3152
|
+
export class ListMessagesParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
2072
3153
|
export class ListMessagesParams extends /*#__PURE__*/S.Struct({
|
|
2073
3154
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2074
3155
|
nullable: true,
|
|
2075
3156
|
default: () => 20
|
|
2076
3157
|
}),
|
|
2077
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
3158
|
+
"order": /*#__PURE__*/S.optionalWith(ListMessagesParamsOrder, {
|
|
2078
3159
|
nullable: true,
|
|
2079
3160
|
default: () => "desc"
|
|
2080
3161
|
}),
|
|
@@ -2088,8 +3169,14 @@ export class ListMessagesParams extends /*#__PURE__*/S.Struct({
|
|
|
2088
3169
|
nullable: true
|
|
2089
3170
|
})
|
|
2090
3171
|
}) {}
|
|
3172
|
+
export class MessageObjectObject extends /*#__PURE__*/S.Literal("thread.message") {}
|
|
3173
|
+
export class MessageObjectStatus extends /*#__PURE__*/S.Literal("in_progress", "incomplete", "completed") {}
|
|
3174
|
+
export class MessageObjectIncompleteDetailsReason extends /*#__PURE__*/S.Literal("content_filter", "max_tokens", "run_cancelled", "run_expired", "run_failed") {}
|
|
3175
|
+
export class MessageObjectRole extends /*#__PURE__*/S.Literal("user", "assistant") {}
|
|
3176
|
+
export class MessageContentTextObjectType extends /*#__PURE__*/S.Literal("text") {}
|
|
3177
|
+
export class MessageContentTextAnnotationsFileCitationObjectType extends /*#__PURE__*/S.Literal("file_citation") {}
|
|
2091
3178
|
export class MessageContentTextAnnotationsFileCitationObject extends /*#__PURE__*/S.Struct({
|
|
2092
|
-
"type":
|
|
3179
|
+
"type": MessageContentTextAnnotationsFileCitationObjectType,
|
|
2093
3180
|
"text": S.String,
|
|
2094
3181
|
"file_citation": /*#__PURE__*/S.Struct({
|
|
2095
3182
|
"file_id": S.String
|
|
@@ -2097,8 +3184,9 @@ export class MessageContentTextAnnotationsFileCitationObject extends /*#__PURE__
|
|
|
2097
3184
|
"start_index": /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
2098
3185
|
"end_index": /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0))
|
|
2099
3186
|
}) {}
|
|
3187
|
+
export class MessageContentTextAnnotationsFilePathObjectType extends /*#__PURE__*/S.Literal("file_path") {}
|
|
2100
3188
|
export class MessageContentTextAnnotationsFilePathObject extends /*#__PURE__*/S.Struct({
|
|
2101
|
-
"type":
|
|
3189
|
+
"type": MessageContentTextAnnotationsFilePathObjectType,
|
|
2102
3190
|
"text": S.String,
|
|
2103
3191
|
"file_path": /*#__PURE__*/S.Struct({
|
|
2104
3192
|
"file_id": S.String
|
|
@@ -2107,28 +3195,29 @@ export class MessageContentTextAnnotationsFilePathObject extends /*#__PURE__*/S.
|
|
|
2107
3195
|
"end_index": /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0))
|
|
2108
3196
|
}) {}
|
|
2109
3197
|
export class MessageContentTextObject extends /*#__PURE__*/S.Struct({
|
|
2110
|
-
"type":
|
|
3198
|
+
"type": MessageContentTextObjectType,
|
|
2111
3199
|
"text": /*#__PURE__*/S.Struct({
|
|
2112
3200
|
"value": S.String,
|
|
2113
3201
|
"annotations": /*#__PURE__*/S.Array( /*#__PURE__*/S.Union(MessageContentTextAnnotationsFileCitationObject, MessageContentTextAnnotationsFilePathObject))
|
|
2114
3202
|
})
|
|
2115
3203
|
}) {}
|
|
3204
|
+
export class MessageContentRefusalObjectType extends /*#__PURE__*/S.Literal("refusal") {}
|
|
2116
3205
|
export class MessageContentRefusalObject extends /*#__PURE__*/S.Struct({
|
|
2117
|
-
"type":
|
|
3206
|
+
"type": MessageContentRefusalObjectType,
|
|
2118
3207
|
"refusal": S.String
|
|
2119
3208
|
}) {}
|
|
2120
3209
|
export class MessageObject extends /*#__PURE__*/S.Struct({
|
|
2121
3210
|
"id": S.String,
|
|
2122
|
-
"object":
|
|
3211
|
+
"object": MessageObjectObject,
|
|
2123
3212
|
"created_at": S.Int,
|
|
2124
3213
|
"thread_id": S.String,
|
|
2125
|
-
"status":
|
|
3214
|
+
"status": MessageObjectStatus,
|
|
2126
3215
|
"incomplete_details": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2127
|
-
"reason":
|
|
3216
|
+
"reason": MessageObjectIncompleteDetailsReason
|
|
2128
3217
|
})),
|
|
2129
3218
|
"completed_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
2130
3219
|
"incomplete_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
2131
|
-
"role":
|
|
3220
|
+
"role": MessageObjectRole,
|
|
2132
3221
|
"content": /*#__PURE__*/S.Array( /*#__PURE__*/S.Union(MessageContentImageFileObject, MessageContentImageUrlObject, MessageContentTextObject, MessageContentRefusalObject)),
|
|
2133
3222
|
"assistant_id": /*#__PURE__*/S.NullOr(S.String),
|
|
2134
3223
|
"run_id": /*#__PURE__*/S.NullOr(S.String),
|
|
@@ -2160,17 +3249,19 @@ export class ModifyMessageRequest extends /*#__PURE__*/S.Class("ModifyMessageReq
|
|
|
2160
3249
|
nullable: true
|
|
2161
3250
|
})
|
|
2162
3251
|
}) {}
|
|
3252
|
+
export class DeleteMessageResponseObject extends /*#__PURE__*/S.Literal("thread.message.deleted") {}
|
|
2163
3253
|
export class DeleteMessageResponse extends /*#__PURE__*/S.Class("DeleteMessageResponse")({
|
|
2164
3254
|
"id": S.String,
|
|
2165
3255
|
"deleted": S.Boolean,
|
|
2166
|
-
"object":
|
|
3256
|
+
"object": DeleteMessageResponseObject
|
|
2167
3257
|
}) {}
|
|
3258
|
+
export class ListRunsParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
2168
3259
|
export class ListRunsParams extends /*#__PURE__*/S.Struct({
|
|
2169
3260
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2170
3261
|
nullable: true,
|
|
2171
3262
|
default: () => 20
|
|
2172
3263
|
}),
|
|
2173
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
3264
|
+
"order": /*#__PURE__*/S.optionalWith(ListRunsParamsOrder, {
|
|
2174
3265
|
nullable: true,
|
|
2175
3266
|
default: () => "desc"
|
|
2176
3267
|
}),
|
|
@@ -2188,14 +3279,16 @@ export class ListRunsResponse extends /*#__PURE__*/S.Class("ListRunsResponse")({
|
|
|
2188
3279
|
"last_id": S.String,
|
|
2189
3280
|
"has_more": S.Boolean
|
|
2190
3281
|
}) {}
|
|
3282
|
+
export class CreateRunParamsInclude extends /*#__PURE__*/S.Literal("step_details.tool_calls[*].file_search.results[*].content") {}
|
|
2191
3283
|
export class CreateRunParams extends /*#__PURE__*/S.Struct({
|
|
2192
|
-
"include[]": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(
|
|
3284
|
+
"include[]": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(CreateRunParamsInclude), {
|
|
2193
3285
|
nullable: true
|
|
2194
3286
|
})
|
|
2195
3287
|
}) {}
|
|
3288
|
+
export class CreateRunRequestModel extends /*#__PURE__*/S.Literal("gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-turbo-preview", "gpt-4-1106-preview", "gpt-4-vision-preview", "gpt-4", "gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613") {}
|
|
2196
3289
|
export class CreateRunRequest extends /*#__PURE__*/S.Class("CreateRunRequest")({
|
|
2197
3290
|
"assistant_id": S.String,
|
|
2198
|
-
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String,
|
|
3291
|
+
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String, CreateRunRequestModel), {
|
|
2199
3292
|
nullable: true
|
|
2200
3293
|
}),
|
|
2201
3294
|
"instructions": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -2255,12 +3348,14 @@ export class ModifyRunRequest extends /*#__PURE__*/S.Class("ModifyRunRequest")({
|
|
|
2255
3348
|
nullable: true
|
|
2256
3349
|
})
|
|
2257
3350
|
}) {}
|
|
3351
|
+
export class ListRunStepsParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
3352
|
+
export class ListRunStepsParamsInclude extends /*#__PURE__*/S.Literal("step_details.tool_calls[*].file_search.results[*].content") {}
|
|
2258
3353
|
export class ListRunStepsParams extends /*#__PURE__*/S.Struct({
|
|
2259
3354
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2260
3355
|
nullable: true,
|
|
2261
3356
|
default: () => 20
|
|
2262
3357
|
}),
|
|
2263
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
3358
|
+
"order": /*#__PURE__*/S.optionalWith(ListRunStepsParamsOrder, {
|
|
2264
3359
|
nullable: true,
|
|
2265
3360
|
default: () => "desc"
|
|
2266
3361
|
}),
|
|
@@ -2270,29 +3365,37 @@ export class ListRunStepsParams extends /*#__PURE__*/S.Struct({
|
|
|
2270
3365
|
"before": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2271
3366
|
nullable: true
|
|
2272
3367
|
}),
|
|
2273
|
-
"include[]": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(
|
|
3368
|
+
"include[]": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(ListRunStepsParamsInclude), {
|
|
2274
3369
|
nullable: true
|
|
2275
3370
|
})
|
|
2276
3371
|
}) {}
|
|
3372
|
+
export class RunStepObjectObject extends /*#__PURE__*/S.Literal("thread.run.step") {}
|
|
3373
|
+
export class RunStepObjectType extends /*#__PURE__*/S.Literal("message_creation", "tool_calls") {}
|
|
3374
|
+
export class RunStepObjectStatus extends /*#__PURE__*/S.Literal("in_progress", "cancelled", "failed", "completed", "expired") {}
|
|
3375
|
+
export class RunStepDetailsMessageCreationObjectType extends /*#__PURE__*/S.Literal("message_creation") {}
|
|
2277
3376
|
export class RunStepDetailsMessageCreationObject extends /*#__PURE__*/S.Struct({
|
|
2278
|
-
"type":
|
|
3377
|
+
"type": RunStepDetailsMessageCreationObjectType,
|
|
2279
3378
|
"message_creation": /*#__PURE__*/S.Struct({
|
|
2280
3379
|
"message_id": S.String
|
|
2281
3380
|
})
|
|
2282
3381
|
}) {}
|
|
3382
|
+
export class RunStepDetailsToolCallsObjectType extends /*#__PURE__*/S.Literal("tool_calls") {}
|
|
3383
|
+
export class RunStepDetailsToolCallsCodeObjectType extends /*#__PURE__*/S.Literal("code_interpreter") {}
|
|
3384
|
+
export class RunStepDetailsToolCallsCodeOutputLogsObjectType extends /*#__PURE__*/S.Literal("logs") {}
|
|
2283
3385
|
export class RunStepDetailsToolCallsCodeOutputLogsObject extends /*#__PURE__*/S.Struct({
|
|
2284
|
-
"type":
|
|
3386
|
+
"type": RunStepDetailsToolCallsCodeOutputLogsObjectType,
|
|
2285
3387
|
"logs": S.String
|
|
2286
3388
|
}) {}
|
|
3389
|
+
export class RunStepDetailsToolCallsCodeOutputImageObjectType extends /*#__PURE__*/S.Literal("image") {}
|
|
2287
3390
|
export class RunStepDetailsToolCallsCodeOutputImageObject extends /*#__PURE__*/S.Struct({
|
|
2288
|
-
"type":
|
|
3391
|
+
"type": RunStepDetailsToolCallsCodeOutputImageObjectType,
|
|
2289
3392
|
"image": /*#__PURE__*/S.Struct({
|
|
2290
3393
|
"file_id": S.String
|
|
2291
3394
|
})
|
|
2292
3395
|
}) {}
|
|
2293
3396
|
export class RunStepDetailsToolCallsCodeObject extends /*#__PURE__*/S.Struct({
|
|
2294
3397
|
"id": S.String,
|
|
2295
|
-
"type":
|
|
3398
|
+
"type": RunStepDetailsToolCallsCodeObjectType,
|
|
2296
3399
|
"code_interpreter": /*#__PURE__*/S.Struct({
|
|
2297
3400
|
"input": S.String,
|
|
2298
3401
|
"outputs": /*#__PURE__*/S.Array( /*#__PURE__*/S.Record({
|
|
@@ -2301,16 +3404,19 @@ export class RunStepDetailsToolCallsCodeObject extends /*#__PURE__*/S.Struct({
|
|
|
2301
3404
|
}))
|
|
2302
3405
|
})
|
|
2303
3406
|
}) {}
|
|
3407
|
+
export class RunStepDetailsToolCallsFileSearchObjectType extends /*#__PURE__*/S.Literal("file_search") {}
|
|
3408
|
+
export class RunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker extends /*#__PURE__*/S.Literal("default_2024_08_21") {}
|
|
2304
3409
|
export class RunStepDetailsToolCallsFileSearchRankingOptionsObject extends /*#__PURE__*/S.Struct({
|
|
2305
|
-
"ranker":
|
|
3410
|
+
"ranker": RunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker,
|
|
2306
3411
|
"score_threshold": /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1))
|
|
2307
3412
|
}) {}
|
|
3413
|
+
export class RunStepDetailsToolCallsFileSearchResultObjectContentType extends /*#__PURE__*/S.Literal("text") {}
|
|
2308
3414
|
export class RunStepDetailsToolCallsFileSearchResultObject extends /*#__PURE__*/S.Struct({
|
|
2309
3415
|
"file_id": S.String,
|
|
2310
3416
|
"file_name": S.String,
|
|
2311
3417
|
"score": /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1)),
|
|
2312
3418
|
"content": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
2313
|
-
"type": /*#__PURE__*/S.optionalWith(
|
|
3419
|
+
"type": /*#__PURE__*/S.optionalWith(RunStepDetailsToolCallsFileSearchResultObjectContentType, {
|
|
2314
3420
|
nullable: true
|
|
2315
3421
|
}),
|
|
2316
3422
|
"text": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -2322,7 +3428,7 @@ export class RunStepDetailsToolCallsFileSearchResultObject extends /*#__PURE__*/
|
|
|
2322
3428
|
}) {}
|
|
2323
3429
|
export class RunStepDetailsToolCallsFileSearchObject extends /*#__PURE__*/S.Struct({
|
|
2324
3430
|
"id": S.String,
|
|
2325
|
-
"type":
|
|
3431
|
+
"type": RunStepDetailsToolCallsFileSearchObjectType,
|
|
2326
3432
|
"file_search": /*#__PURE__*/S.Struct({
|
|
2327
3433
|
"ranking_options": /*#__PURE__*/S.optionalWith(RunStepDetailsToolCallsFileSearchRankingOptionsObject, {
|
|
2328
3434
|
nullable: true
|
|
@@ -2332,9 +3438,10 @@ export class RunStepDetailsToolCallsFileSearchObject extends /*#__PURE__*/S.Stru
|
|
|
2332
3438
|
})
|
|
2333
3439
|
})
|
|
2334
3440
|
}) {}
|
|
3441
|
+
export class RunStepDetailsToolCallsFunctionObjectType extends /*#__PURE__*/S.Literal("function") {}
|
|
2335
3442
|
export class RunStepDetailsToolCallsFunctionObject extends /*#__PURE__*/S.Struct({
|
|
2336
3443
|
"id": S.String,
|
|
2337
|
-
"type":
|
|
3444
|
+
"type": RunStepDetailsToolCallsFunctionObjectType,
|
|
2338
3445
|
"function": /*#__PURE__*/S.Struct({
|
|
2339
3446
|
"name": S.String,
|
|
2340
3447
|
"arguments": S.String,
|
|
@@ -2342,9 +3449,10 @@ export class RunStepDetailsToolCallsFunctionObject extends /*#__PURE__*/S.Struct
|
|
|
2342
3449
|
})
|
|
2343
3450
|
}) {}
|
|
2344
3451
|
export class RunStepDetailsToolCallsObject extends /*#__PURE__*/S.Struct({
|
|
2345
|
-
"type":
|
|
3452
|
+
"type": RunStepDetailsToolCallsObjectType,
|
|
2346
3453
|
"tool_calls": /*#__PURE__*/S.Array( /*#__PURE__*/S.Union(RunStepDetailsToolCallsCodeObject, RunStepDetailsToolCallsFileSearchObject, RunStepDetailsToolCallsFunctionObject))
|
|
2347
3454
|
}) {}
|
|
3455
|
+
export class RunStepObjectLastErrorCode extends /*#__PURE__*/S.Literal("server_error", "rate_limit_exceeded") {}
|
|
2348
3456
|
export class RunStepCompletionUsage extends /*#__PURE__*/S.Struct({
|
|
2349
3457
|
"completion_tokens": S.Int,
|
|
2350
3458
|
"prompt_tokens": S.Int,
|
|
@@ -2352,19 +3460,19 @@ export class RunStepCompletionUsage extends /*#__PURE__*/S.Struct({
|
|
|
2352
3460
|
}) {}
|
|
2353
3461
|
export class RunStepObject extends /*#__PURE__*/S.Struct({
|
|
2354
3462
|
"id": S.String,
|
|
2355
|
-
"object":
|
|
3463
|
+
"object": RunStepObjectObject,
|
|
2356
3464
|
"created_at": S.Int,
|
|
2357
3465
|
"assistant_id": S.String,
|
|
2358
3466
|
"thread_id": S.String,
|
|
2359
3467
|
"run_id": S.String,
|
|
2360
|
-
"type":
|
|
2361
|
-
"status":
|
|
3468
|
+
"type": RunStepObjectType,
|
|
3469
|
+
"status": RunStepObjectStatus,
|
|
2362
3470
|
"step_details": /*#__PURE__*/S.Record({
|
|
2363
3471
|
key: S.String,
|
|
2364
3472
|
value: S.Unknown
|
|
2365
3473
|
}),
|
|
2366
3474
|
"last_error": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2367
|
-
"code":
|
|
3475
|
+
"code": RunStepObjectLastErrorCode,
|
|
2368
3476
|
"message": S.String
|
|
2369
3477
|
})),
|
|
2370
3478
|
"expired_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
@@ -2384,8 +3492,9 @@ export class ListRunStepsResponse extends /*#__PURE__*/S.Class("ListRunStepsResp
|
|
|
2384
3492
|
"last_id": S.String,
|
|
2385
3493
|
"has_more": S.Boolean
|
|
2386
3494
|
}) {}
|
|
3495
|
+
export class GetRunStepParamsInclude extends /*#__PURE__*/S.Literal("step_details.tool_calls[*].file_search.results[*].content") {}
|
|
2387
3496
|
export class GetRunStepParams extends /*#__PURE__*/S.Struct({
|
|
2388
|
-
"include[]": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(
|
|
3497
|
+
"include[]": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(GetRunStepParamsInclude), {
|
|
2389
3498
|
nullable: true
|
|
2390
3499
|
})
|
|
2391
3500
|
}) {}
|
|
@@ -2402,21 +3511,24 @@ export class SubmitToolOutputsRunRequest extends /*#__PURE__*/S.Class("SubmitToo
|
|
|
2402
3511
|
nullable: true
|
|
2403
3512
|
})
|
|
2404
3513
|
}) {}
|
|
3514
|
+
export class CreateUploadRequestPurpose extends /*#__PURE__*/S.Literal("assistants", "batch", "fine-tune", "vision") {}
|
|
2405
3515
|
export class CreateUploadRequest extends /*#__PURE__*/S.Class("CreateUploadRequest")({
|
|
2406
3516
|
"filename": S.String,
|
|
2407
|
-
"purpose":
|
|
3517
|
+
"purpose": CreateUploadRequestPurpose,
|
|
2408
3518
|
"bytes": S.Int,
|
|
2409
3519
|
"mime_type": S.String
|
|
2410
3520
|
}) {}
|
|
3521
|
+
export class UploadStatus extends /*#__PURE__*/S.Literal("pending", "completed", "cancelled", "expired") {}
|
|
3522
|
+
export class UploadObject extends /*#__PURE__*/S.Literal("upload") {}
|
|
2411
3523
|
export class Upload extends /*#__PURE__*/S.Class("Upload")({
|
|
2412
3524
|
"id": S.String,
|
|
2413
3525
|
"created_at": S.Int,
|
|
2414
3526
|
"filename": S.String,
|
|
2415
3527
|
"bytes": S.Int,
|
|
2416
3528
|
"purpose": S.String,
|
|
2417
|
-
"status":
|
|
3529
|
+
"status": UploadStatus,
|
|
2418
3530
|
"expires_at": S.Int,
|
|
2419
|
-
"object": /*#__PURE__*/S.optionalWith(
|
|
3531
|
+
"object": /*#__PURE__*/S.optionalWith(UploadObject, {
|
|
2420
3532
|
nullable: true
|
|
2421
3533
|
}),
|
|
2422
3534
|
"file": /*#__PURE__*/S.optionalWith(OpenAIFile, {
|
|
@@ -2429,18 +3541,20 @@ export class CompleteUploadRequest extends /*#__PURE__*/S.Class("CompleteUploadR
|
|
|
2429
3541
|
nullable: true
|
|
2430
3542
|
})
|
|
2431
3543
|
}) {}
|
|
3544
|
+
export class UploadPartObject extends /*#__PURE__*/S.Literal("upload.part") {}
|
|
2432
3545
|
export class UploadPart extends /*#__PURE__*/S.Class("UploadPart")({
|
|
2433
3546
|
"id": S.String,
|
|
2434
3547
|
"created_at": S.Int,
|
|
2435
3548
|
"upload_id": S.String,
|
|
2436
|
-
"object":
|
|
3549
|
+
"object": UploadPartObject
|
|
2437
3550
|
}) {}
|
|
3551
|
+
export class ListVectorStoresParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
2438
3552
|
export class ListVectorStoresParams extends /*#__PURE__*/S.Struct({
|
|
2439
3553
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2440
3554
|
nullable: true,
|
|
2441
3555
|
default: () => 20
|
|
2442
3556
|
}),
|
|
2443
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
3557
|
+
"order": /*#__PURE__*/S.optionalWith(ListVectorStoresParamsOrder, {
|
|
2444
3558
|
nullable: true,
|
|
2445
3559
|
default: () => "desc"
|
|
2446
3560
|
}),
|
|
@@ -2451,13 +3565,16 @@ export class ListVectorStoresParams extends /*#__PURE__*/S.Struct({
|
|
|
2451
3565
|
nullable: true
|
|
2452
3566
|
})
|
|
2453
3567
|
}) {}
|
|
3568
|
+
export class VectorStoreObjectObject extends /*#__PURE__*/S.Literal("vector_store") {}
|
|
3569
|
+
export class VectorStoreObjectStatus extends /*#__PURE__*/S.Literal("expired", "in_progress", "completed") {}
|
|
3570
|
+
export class VectorStoreExpirationAfterAnchor extends /*#__PURE__*/S.Literal("last_active_at") {}
|
|
2454
3571
|
export class VectorStoreExpirationAfter extends /*#__PURE__*/S.Struct({
|
|
2455
|
-
"anchor":
|
|
3572
|
+
"anchor": VectorStoreExpirationAfterAnchor,
|
|
2456
3573
|
"days": /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(365))
|
|
2457
3574
|
}) {}
|
|
2458
3575
|
export class VectorStoreObject extends /*#__PURE__*/S.Struct({
|
|
2459
3576
|
"id": S.String,
|
|
2460
|
-
"object":
|
|
3577
|
+
"object": VectorStoreObjectObject,
|
|
2461
3578
|
"created_at": S.Int,
|
|
2462
3579
|
"name": S.String,
|
|
2463
3580
|
"usage_bytes": S.Int,
|
|
@@ -2468,7 +3585,7 @@ export class VectorStoreObject extends /*#__PURE__*/S.Struct({
|
|
|
2468
3585
|
"cancelled": S.Int,
|
|
2469
3586
|
"total": S.Int
|
|
2470
3587
|
}),
|
|
2471
|
-
"status":
|
|
3588
|
+
"status": VectorStoreObjectStatus,
|
|
2472
3589
|
"expires_after": /*#__PURE__*/S.optionalWith(VectorStoreExpirationAfter, {
|
|
2473
3590
|
nullable: true
|
|
2474
3591
|
}),
|
|
@@ -2488,15 +3605,17 @@ export class ListVectorStoresResponse extends /*#__PURE__*/S.Class("ListVectorSt
|
|
|
2488
3605
|
"last_id": S.String,
|
|
2489
3606
|
"has_more": S.Boolean
|
|
2490
3607
|
}) {}
|
|
3608
|
+
export class AutoChunkingStrategyRequestParamType extends /*#__PURE__*/S.Literal("auto") {}
|
|
2491
3609
|
export class AutoChunkingStrategyRequestParam extends /*#__PURE__*/S.Struct({
|
|
2492
|
-
"type":
|
|
3610
|
+
"type": AutoChunkingStrategyRequestParamType
|
|
2493
3611
|
}) {}
|
|
3612
|
+
export class StaticChunkingStrategyRequestParamType extends /*#__PURE__*/S.Literal("static") {}
|
|
2494
3613
|
export class StaticChunkingStrategy extends /*#__PURE__*/S.Struct({
|
|
2495
3614
|
"max_chunk_size_tokens": /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(100), /*#__PURE__*/S.lessThanOrEqualTo(4096)),
|
|
2496
3615
|
"chunk_overlap_tokens": S.Int
|
|
2497
3616
|
}) {}
|
|
2498
3617
|
export class StaticChunkingStrategyRequestParam extends /*#__PURE__*/S.Struct({
|
|
2499
|
-
"type":
|
|
3618
|
+
"type": StaticChunkingStrategyRequestParamType,
|
|
2500
3619
|
"static": StaticChunkingStrategy
|
|
2501
3620
|
}) {}
|
|
2502
3621
|
export class CreateVectorStoreRequest extends /*#__PURE__*/S.Class("CreateVectorStoreRequest")({
|
|
@@ -2536,10 +3655,11 @@ export class UpdateVectorStoreRequest extends /*#__PURE__*/S.Class("UpdateVector
|
|
|
2536
3655
|
nullable: true
|
|
2537
3656
|
})
|
|
2538
3657
|
}) {}
|
|
3658
|
+
export class DeleteVectorStoreResponseObject extends /*#__PURE__*/S.Literal("vector_store.deleted") {}
|
|
2539
3659
|
export class DeleteVectorStoreResponse extends /*#__PURE__*/S.Class("DeleteVectorStoreResponse")({
|
|
2540
3660
|
"id": S.String,
|
|
2541
3661
|
"deleted": S.Boolean,
|
|
2542
|
-
"object":
|
|
3662
|
+
"object": DeleteVectorStoreResponseObject
|
|
2543
3663
|
}) {}
|
|
2544
3664
|
export class ChunkingStrategyRequestParam extends /*#__PURE__*/S.Record({
|
|
2545
3665
|
key: S.String,
|
|
@@ -2551,12 +3671,14 @@ export class CreateVectorStoreFileBatchRequest extends /*#__PURE__*/S.Class("Cre
|
|
|
2551
3671
|
nullable: true
|
|
2552
3672
|
})
|
|
2553
3673
|
}) {}
|
|
3674
|
+
export class VectorStoreFileBatchObjectObject extends /*#__PURE__*/S.Literal("vector_store.files_batch") {}
|
|
3675
|
+
export class VectorStoreFileBatchObjectStatus extends /*#__PURE__*/S.Literal("in_progress", "completed", "cancelled", "failed") {}
|
|
2554
3676
|
export class VectorStoreFileBatchObject extends /*#__PURE__*/S.Class("VectorStoreFileBatchObject")({
|
|
2555
3677
|
"id": S.String,
|
|
2556
|
-
"object":
|
|
3678
|
+
"object": VectorStoreFileBatchObjectObject,
|
|
2557
3679
|
"created_at": S.Int,
|
|
2558
3680
|
"vector_store_id": S.String,
|
|
2559
|
-
"status":
|
|
3681
|
+
"status": VectorStoreFileBatchObjectStatus,
|
|
2560
3682
|
"file_counts": /*#__PURE__*/S.Struct({
|
|
2561
3683
|
"in_progress": S.Int,
|
|
2562
3684
|
"completed": S.Int,
|
|
@@ -2565,12 +3687,14 @@ export class VectorStoreFileBatchObject extends /*#__PURE__*/S.Class("VectorStor
|
|
|
2565
3687
|
"total": S.Int
|
|
2566
3688
|
})
|
|
2567
3689
|
}) {}
|
|
3690
|
+
export class ListFilesInVectorStoreBatchParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
3691
|
+
export class ListFilesInVectorStoreBatchParamsFilter extends /*#__PURE__*/S.Literal("in_progress", "completed", "failed", "cancelled") {}
|
|
2568
3692
|
export class ListFilesInVectorStoreBatchParams extends /*#__PURE__*/S.Struct({
|
|
2569
3693
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2570
3694
|
nullable: true,
|
|
2571
3695
|
default: () => 20
|
|
2572
3696
|
}),
|
|
2573
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
3697
|
+
"order": /*#__PURE__*/S.optionalWith(ListFilesInVectorStoreBatchParamsOrder, {
|
|
2574
3698
|
nullable: true,
|
|
2575
3699
|
default: () => "desc"
|
|
2576
3700
|
}),
|
|
@@ -2580,26 +3704,31 @@ export class ListFilesInVectorStoreBatchParams extends /*#__PURE__*/S.Struct({
|
|
|
2580
3704
|
"before": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2581
3705
|
nullable: true
|
|
2582
3706
|
}),
|
|
2583
|
-
"filter": /*#__PURE__*/S.optionalWith(
|
|
3707
|
+
"filter": /*#__PURE__*/S.optionalWith(ListFilesInVectorStoreBatchParamsFilter, {
|
|
2584
3708
|
nullable: true
|
|
2585
3709
|
})
|
|
2586
3710
|
}) {}
|
|
3711
|
+
export class VectorStoreFileObjectObject extends /*#__PURE__*/S.Literal("vector_store.file") {}
|
|
3712
|
+
export class VectorStoreFileObjectStatus extends /*#__PURE__*/S.Literal("in_progress", "completed", "cancelled", "failed") {}
|
|
3713
|
+
export class VectorStoreFileObjectLastErrorCode extends /*#__PURE__*/S.Literal("server_error", "unsupported_file", "invalid_file") {}
|
|
3714
|
+
export class StaticChunkingStrategyResponseParamType extends /*#__PURE__*/S.Literal("static") {}
|
|
2587
3715
|
export class StaticChunkingStrategyResponseParam extends /*#__PURE__*/S.Struct({
|
|
2588
|
-
"type":
|
|
3716
|
+
"type": StaticChunkingStrategyResponseParamType,
|
|
2589
3717
|
"static": StaticChunkingStrategy
|
|
2590
3718
|
}) {}
|
|
3719
|
+
export class OtherChunkingStrategyResponseParamType extends /*#__PURE__*/S.Literal("other") {}
|
|
2591
3720
|
export class OtherChunkingStrategyResponseParam extends /*#__PURE__*/S.Struct({
|
|
2592
|
-
"type":
|
|
3721
|
+
"type": OtherChunkingStrategyResponseParamType
|
|
2593
3722
|
}) {}
|
|
2594
3723
|
export class VectorStoreFileObject extends /*#__PURE__*/S.Struct({
|
|
2595
3724
|
"id": S.String,
|
|
2596
|
-
"object":
|
|
3725
|
+
"object": VectorStoreFileObjectObject,
|
|
2597
3726
|
"usage_bytes": S.Int,
|
|
2598
3727
|
"created_at": S.Int,
|
|
2599
3728
|
"vector_store_id": S.String,
|
|
2600
|
-
"status":
|
|
3729
|
+
"status": VectorStoreFileObjectStatus,
|
|
2601
3730
|
"last_error": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2602
|
-
"code":
|
|
3731
|
+
"code": VectorStoreFileObjectLastErrorCode,
|
|
2603
3732
|
"message": S.String
|
|
2604
3733
|
})),
|
|
2605
3734
|
"chunking_strategy": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Record({
|
|
@@ -2616,12 +3745,14 @@ export class ListVectorStoreFilesResponse extends /*#__PURE__*/S.Class("ListVect
|
|
|
2616
3745
|
"last_id": S.String,
|
|
2617
3746
|
"has_more": S.Boolean
|
|
2618
3747
|
}) {}
|
|
3748
|
+
export class ListVectorStoreFilesParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
3749
|
+
export class ListVectorStoreFilesParamsFilter extends /*#__PURE__*/S.Literal("in_progress", "completed", "failed", "cancelled") {}
|
|
2619
3750
|
export class ListVectorStoreFilesParams extends /*#__PURE__*/S.Struct({
|
|
2620
3751
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2621
3752
|
nullable: true,
|
|
2622
3753
|
default: () => 20
|
|
2623
3754
|
}),
|
|
2624
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
3755
|
+
"order": /*#__PURE__*/S.optionalWith(ListVectorStoreFilesParamsOrder, {
|
|
2625
3756
|
nullable: true,
|
|
2626
3757
|
default: () => "desc"
|
|
2627
3758
|
}),
|
|
@@ -2631,7 +3762,7 @@ export class ListVectorStoreFilesParams extends /*#__PURE__*/S.Struct({
|
|
|
2631
3762
|
"before": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2632
3763
|
nullable: true
|
|
2633
3764
|
}),
|
|
2634
|
-
"filter": /*#__PURE__*/S.optionalWith(
|
|
3765
|
+
"filter": /*#__PURE__*/S.optionalWith(ListVectorStoreFilesParamsFilter, {
|
|
2635
3766
|
nullable: true
|
|
2636
3767
|
})
|
|
2637
3768
|
}) {}
|
|
@@ -2641,10 +3772,11 @@ export class CreateVectorStoreFileRequest extends /*#__PURE__*/S.Class("CreateVe
|
|
|
2641
3772
|
nullable: true
|
|
2642
3773
|
})
|
|
2643
3774
|
}) {}
|
|
3775
|
+
export class DeleteVectorStoreFileResponseObject extends /*#__PURE__*/S.Literal("vector_store.file.deleted") {}
|
|
2644
3776
|
export class DeleteVectorStoreFileResponse extends /*#__PURE__*/S.Class("DeleteVectorStoreFileResponse")({
|
|
2645
3777
|
"id": S.String,
|
|
2646
3778
|
"deleted": S.Boolean,
|
|
2647
|
-
"object":
|
|
3779
|
+
"object": DeleteVectorStoreFileResponseObject
|
|
2648
3780
|
}) {}
|
|
2649
3781
|
export const make = httpClient => {
|
|
2650
3782
|
const unexpectedStatus = (request, response) => Effect.flatMap(Effect.orElseSucceed(response.text, () => "Unexpected status code"), description => Effect.fail(new HttpClientError.ResponseError({
|
|
@@ -2723,7 +3855,10 @@ export const make = httpClient => {
|
|
|
2723
3855
|
orElse: response => unexpectedStatus(request, response)
|
|
2724
3856
|
}))), Effect.scoped),
|
|
2725
3857
|
"listFiles": options => HttpClientRequest.make("GET")(`/files`).pipe(HttpClientRequest.setUrlParams({
|
|
2726
|
-
"purpose": options["purpose"]
|
|
3858
|
+
"purpose": options["purpose"],
|
|
3859
|
+
"limit": options["limit"],
|
|
3860
|
+
"order": options["order"],
|
|
3861
|
+
"after": options["after"]
|
|
2727
3862
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2728
3863
|
"200": r => HttpClientResponse.schemaBodyJson(ListFilesResponse)(r),
|
|
2729
3864
|
orElse: response => unexpectedStatus(request, response)
|
|
@@ -2805,6 +3940,26 @@ export const make = httpClient => {
|
|
|
2805
3940
|
"200": r => HttpClientResponse.schemaBodyJson(CreateModerationResponse)(r),
|
|
2806
3941
|
orElse: response => unexpectedStatus(request, response)
|
|
2807
3942
|
}))), Effect.scoped),
|
|
3943
|
+
"adminApiKeysList": options => HttpClientRequest.make("GET")(`/organization/admin_api_keys`).pipe(HttpClientRequest.setUrlParams({
|
|
3944
|
+
"after": options["after"],
|
|
3945
|
+
"order": options["order"],
|
|
3946
|
+
"limit": options["limit"]
|
|
3947
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
3948
|
+
"200": r => HttpClientResponse.schemaBodyJson(ApiKeyList)(r),
|
|
3949
|
+
orElse: response => unexpectedStatus(request, response)
|
|
3950
|
+
}))), Effect.scoped),
|
|
3951
|
+
"adminApiKeysCreate": options => HttpClientRequest.make("POST")(`/organization/admin_api_keys`).pipe(req => Effect.orDie(HttpClientRequest.bodyJson(req, options)), Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
3952
|
+
"200": r => HttpClientResponse.schemaBodyJson(AdminApiKey)(r),
|
|
3953
|
+
orElse: response => unexpectedStatus(request, response)
|
|
3954
|
+
}))), Effect.scoped),
|
|
3955
|
+
"adminApiKeysGet": keyId => HttpClientRequest.make("GET")(`/organization/admin_api_keys/${keyId}`).pipe(Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
3956
|
+
"200": r => HttpClientResponse.schemaBodyJson(AdminApiKey)(r),
|
|
3957
|
+
orElse: response => unexpectedStatus(request, response)
|
|
3958
|
+
}))), Effect.scoped),
|
|
3959
|
+
"adminApiKeysDelete": keyId => HttpClientRequest.make("DELETE")(`/organization/admin_api_keys/${keyId}`).pipe(Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
3960
|
+
"200": r => HttpClientResponse.schemaBodyJson(AdminApiKeysDelete200)(r),
|
|
3961
|
+
orElse: response => unexpectedStatus(request, response)
|
|
3962
|
+
}))), Effect.scoped),
|
|
2808
3963
|
"listAuditLogs": options => HttpClientRequest.make("GET")(`/organization/audit_logs`).pipe(HttpClientRequest.setUrlParams({
|
|
2809
3964
|
"effective_at[gt]": options["effective_at[gt]"],
|
|
2810
3965
|
"effective_at[gte]": options["effective_at[gte]"],
|
|
@@ -2822,6 +3977,18 @@ export const make = httpClient => {
|
|
|
2822
3977
|
"200": r => HttpClientResponse.schemaBodyJson(ListAuditLogsResponse)(r),
|
|
2823
3978
|
orElse: response => unexpectedStatus(request, response)
|
|
2824
3979
|
}))), Effect.scoped),
|
|
3980
|
+
"usageCosts": options => HttpClientRequest.make("GET")(`/organization/costs`).pipe(HttpClientRequest.setUrlParams({
|
|
3981
|
+
"start_time": options["start_time"],
|
|
3982
|
+
"end_time": options["end_time"],
|
|
3983
|
+
"bucket_width": options["bucket_width"],
|
|
3984
|
+
"project_ids": options["project_ids"],
|
|
3985
|
+
"group_by": options["group_by"],
|
|
3986
|
+
"limit": options["limit"],
|
|
3987
|
+
"page": options["page"]
|
|
3988
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
3989
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
3990
|
+
orElse: response => unexpectedStatus(request, response)
|
|
3991
|
+
}))), Effect.scoped),
|
|
2825
3992
|
"listInvites": options => HttpClientRequest.make("GET")(`/organization/invites`).pipe(HttpClientRequest.setUrlParams({
|
|
2826
3993
|
"limit": options["limit"],
|
|
2827
3994
|
"after": options["after"]
|
|
@@ -2882,6 +4049,19 @@ export const make = httpClient => {
|
|
|
2882
4049
|
"200": r => HttpClientResponse.schemaBodyJson(Project)(r),
|
|
2883
4050
|
orElse: response => unexpectedStatus(request, response)
|
|
2884
4051
|
}))), Effect.scoped),
|
|
4052
|
+
"listProjectRateLimits": (projectId, options) => HttpClientRequest.make("GET")(`/organization/projects/${projectId}/rate_limits`).pipe(HttpClientRequest.setUrlParams({
|
|
4053
|
+
"limit": options["limit"],
|
|
4054
|
+
"after": options["after"],
|
|
4055
|
+
"before": options["before"]
|
|
4056
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4057
|
+
"200": r => HttpClientResponse.schemaBodyJson(ProjectRateLimitListResponse)(r),
|
|
4058
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4059
|
+
}))), Effect.scoped),
|
|
4060
|
+
"updateProjectRateLimits": (projectId, rateLimitId, options) => HttpClientRequest.make("POST")(`/organization/projects/${projectId}/rate_limits/${rateLimitId}`).pipe(req => Effect.orDie(HttpClientRequest.bodyJson(req, options)), Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4061
|
+
"200": r => HttpClientResponse.schemaBodyJson(ProjectRateLimit)(r),
|
|
4062
|
+
"400": r => decodeError(r, ErrorResponse),
|
|
4063
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4064
|
+
}))), Effect.scoped),
|
|
2885
4065
|
"listProjectServiceAccounts": (projectId, options) => HttpClientRequest.make("GET")(`/organization/projects/${projectId}/service_accounts`).pipe(HttpClientRequest.setUrlParams({
|
|
2886
4066
|
"limit": options["limit"],
|
|
2887
4067
|
"after": options["after"]
|
|
@@ -2930,6 +4110,123 @@ export const make = httpClient => {
|
|
|
2930
4110
|
"400": r => decodeError(r, ErrorResponse),
|
|
2931
4111
|
orElse: response => unexpectedStatus(request, response)
|
|
2932
4112
|
}))), Effect.scoped),
|
|
4113
|
+
"usageAudioSpeeches": options => HttpClientRequest.make("GET")(`/organization/usage/audio_speeches`).pipe(HttpClientRequest.setUrlParams({
|
|
4114
|
+
"start_time": options["start_time"],
|
|
4115
|
+
"end_time": options["end_time"],
|
|
4116
|
+
"bucket_width": options["bucket_width"],
|
|
4117
|
+
"project_ids": options["project_ids"],
|
|
4118
|
+
"user_ids": options["user_ids"],
|
|
4119
|
+
"api_key_ids": options["api_key_ids"],
|
|
4120
|
+
"models": options["models"],
|
|
4121
|
+
"group_by": options["group_by"],
|
|
4122
|
+
"limit": options["limit"],
|
|
4123
|
+
"page": options["page"]
|
|
4124
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4125
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4126
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4127
|
+
}))), Effect.scoped),
|
|
4128
|
+
"usageAudioTranscriptions": options => HttpClientRequest.make("GET")(`/organization/usage/audio_transcriptions`).pipe(HttpClientRequest.setUrlParams({
|
|
4129
|
+
"start_time": options["start_time"],
|
|
4130
|
+
"end_time": options["end_time"],
|
|
4131
|
+
"bucket_width": options["bucket_width"],
|
|
4132
|
+
"project_ids": options["project_ids"],
|
|
4133
|
+
"user_ids": options["user_ids"],
|
|
4134
|
+
"api_key_ids": options["api_key_ids"],
|
|
4135
|
+
"models": options["models"],
|
|
4136
|
+
"group_by": options["group_by"],
|
|
4137
|
+
"limit": options["limit"],
|
|
4138
|
+
"page": options["page"]
|
|
4139
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4140
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4141
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4142
|
+
}))), Effect.scoped),
|
|
4143
|
+
"usageCodeInterpreterSessions": options => HttpClientRequest.make("GET")(`/organization/usage/code_interpreter_sessions`).pipe(HttpClientRequest.setUrlParams({
|
|
4144
|
+
"start_time": options["start_time"],
|
|
4145
|
+
"end_time": options["end_time"],
|
|
4146
|
+
"bucket_width": options["bucket_width"],
|
|
4147
|
+
"project_ids": options["project_ids"],
|
|
4148
|
+
"group_by": options["group_by"],
|
|
4149
|
+
"limit": options["limit"],
|
|
4150
|
+
"page": options["page"]
|
|
4151
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4152
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4153
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4154
|
+
}))), Effect.scoped),
|
|
4155
|
+
"usageCompletions": options => HttpClientRequest.make("GET")(`/organization/usage/completions`).pipe(HttpClientRequest.setUrlParams({
|
|
4156
|
+
"start_time": options["start_time"],
|
|
4157
|
+
"end_time": options["end_time"],
|
|
4158
|
+
"bucket_width": options["bucket_width"],
|
|
4159
|
+
"project_ids": options["project_ids"],
|
|
4160
|
+
"user_ids": options["user_ids"],
|
|
4161
|
+
"api_key_ids": options["api_key_ids"],
|
|
4162
|
+
"models": options["models"],
|
|
4163
|
+
"batch": options["batch"],
|
|
4164
|
+
"group_by": options["group_by"],
|
|
4165
|
+
"limit": options["limit"],
|
|
4166
|
+
"page": options["page"]
|
|
4167
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4168
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4169
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4170
|
+
}))), Effect.scoped),
|
|
4171
|
+
"usageEmbeddings": options => HttpClientRequest.make("GET")(`/organization/usage/embeddings`).pipe(HttpClientRequest.setUrlParams({
|
|
4172
|
+
"start_time": options["start_time"],
|
|
4173
|
+
"end_time": options["end_time"],
|
|
4174
|
+
"bucket_width": options["bucket_width"],
|
|
4175
|
+
"project_ids": options["project_ids"],
|
|
4176
|
+
"user_ids": options["user_ids"],
|
|
4177
|
+
"api_key_ids": options["api_key_ids"],
|
|
4178
|
+
"models": options["models"],
|
|
4179
|
+
"group_by": options["group_by"],
|
|
4180
|
+
"limit": options["limit"],
|
|
4181
|
+
"page": options["page"]
|
|
4182
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4183
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4184
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4185
|
+
}))), Effect.scoped),
|
|
4186
|
+
"usageImages": options => HttpClientRequest.make("GET")(`/organization/usage/images`).pipe(HttpClientRequest.setUrlParams({
|
|
4187
|
+
"start_time": options["start_time"],
|
|
4188
|
+
"end_time": options["end_time"],
|
|
4189
|
+
"bucket_width": options["bucket_width"],
|
|
4190
|
+
"sources": options["sources"],
|
|
4191
|
+
"sizes": options["sizes"],
|
|
4192
|
+
"project_ids": options["project_ids"],
|
|
4193
|
+
"user_ids": options["user_ids"],
|
|
4194
|
+
"api_key_ids": options["api_key_ids"],
|
|
4195
|
+
"models": options["models"],
|
|
4196
|
+
"group_by": options["group_by"],
|
|
4197
|
+
"limit": options["limit"],
|
|
4198
|
+
"page": options["page"]
|
|
4199
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4200
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4201
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4202
|
+
}))), Effect.scoped),
|
|
4203
|
+
"usageModerations": options => HttpClientRequest.make("GET")(`/organization/usage/moderations`).pipe(HttpClientRequest.setUrlParams({
|
|
4204
|
+
"start_time": options["start_time"],
|
|
4205
|
+
"end_time": options["end_time"],
|
|
4206
|
+
"bucket_width": options["bucket_width"],
|
|
4207
|
+
"project_ids": options["project_ids"],
|
|
4208
|
+
"user_ids": options["user_ids"],
|
|
4209
|
+
"api_key_ids": options["api_key_ids"],
|
|
4210
|
+
"models": options["models"],
|
|
4211
|
+
"group_by": options["group_by"],
|
|
4212
|
+
"limit": options["limit"],
|
|
4213
|
+
"page": options["page"]
|
|
4214
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4215
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4216
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4217
|
+
}))), Effect.scoped),
|
|
4218
|
+
"usageVectorStores": options => HttpClientRequest.make("GET")(`/organization/usage/vector_stores`).pipe(HttpClientRequest.setUrlParams({
|
|
4219
|
+
"start_time": options["start_time"],
|
|
4220
|
+
"end_time": options["end_time"],
|
|
4221
|
+
"bucket_width": options["bucket_width"],
|
|
4222
|
+
"project_ids": options["project_ids"],
|
|
4223
|
+
"group_by": options["group_by"],
|
|
4224
|
+
"limit": options["limit"],
|
|
4225
|
+
"page": options["page"]
|
|
4226
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4227
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4228
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4229
|
+
}))), Effect.scoped),
|
|
2933
4230
|
"listUsers": options => HttpClientRequest.make("GET")(`/organization/users`).pipe(HttpClientRequest.setUrlParams({
|
|
2934
4231
|
"limit": options["limit"],
|
|
2935
4232
|
"after": options["after"]
|
|
@@ -2949,6 +4246,10 @@ export const make = httpClient => {
|
|
|
2949
4246
|
"200": r => HttpClientResponse.schemaBodyJson(UserDeleteResponse)(r),
|
|
2950
4247
|
orElse: response => unexpectedStatus(request, response)
|
|
2951
4248
|
}))), Effect.scoped),
|
|
4249
|
+
"createRealtimeSession": options => HttpClientRequest.make("POST")(`/realtime/sessions`).pipe(req => Effect.orDie(HttpClientRequest.bodyJson(req, options)), Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4250
|
+
"200": r => HttpClientResponse.schemaBodyJson(RealtimeSessionCreateResponse)(r),
|
|
4251
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4252
|
+
}))), Effect.scoped),
|
|
2952
4253
|
"createThread": options => HttpClientRequest.make("POST")(`/threads`).pipe(req => Effect.orDie(HttpClientRequest.bodyJson(req, options)), Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2953
4254
|
"200": r => HttpClientResponse.schemaBodyJson(ThreadObject)(r),
|
|
2954
4255
|
orElse: response => unexpectedStatus(request, response)
|