@deepraxis/sdk 0.1.1-dev.ed5af3e → 0.1.1-dev.f8aa5de
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.
|
@@ -428,7 +428,7 @@ export declare const fileListFiles: <ThrowOnError extends boolean = false>(optio
|
|
|
428
428
|
/**
|
|
429
429
|
* Upload file
|
|
430
430
|
*
|
|
431
|
-
* Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data
|
|
431
|
+
* Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File(["Return within 23 days."], "policy.txt", { type: "text/plain" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–7776000). Without expiry, the file persists until deleted.
|
|
432
432
|
*/
|
|
433
433
|
export declare const fileCreateFile: <ThrowOnError extends boolean = false>(options: Options<FileCreateFileData, ThrowOnError>) => RequestResult<FileCreateFileResponses, FileCreateFileErrors, ThrowOnError>;
|
|
434
434
|
/**
|
|
@@ -452,7 +452,7 @@ export declare const fileRetrieveFileContent: <ThrowOnError extends boolean = fa
|
|
|
452
452
|
/**
|
|
453
453
|
* Create an upload
|
|
454
454
|
*
|
|
455
|
-
* Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data
|
|
455
|
+
* Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.
|
|
456
456
|
*/
|
|
457
457
|
export declare const fileCreateUpload: <ThrowOnError extends boolean = false>(options: Options<FileCreateUploadData, ThrowOnError>) => RequestResult<FileCreateUploadResponses, FileCreateUploadErrors, ThrowOnError>;
|
|
458
458
|
/**
|
|
@@ -1092,7 +1092,7 @@ export const fileListFiles = (options) => (options?.client ?? client).get({
|
|
|
1092
1092
|
/**
|
|
1093
1093
|
* Upload file
|
|
1094
1094
|
*
|
|
1095
|
-
* Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data
|
|
1095
|
+
* Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File(["Return within 23 days."], "policy.txt", { type: "text/plain" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–7776000). Without expiry, the file persists until deleted.
|
|
1096
1096
|
*/
|
|
1097
1097
|
export const fileCreateFile = (options) => (options.client ?? client).post({
|
|
1098
1098
|
...formDataBodySerializer,
|
|
@@ -1169,7 +1169,7 @@ export const fileRetrieveFileContent = (options) => (options.client ?? client).g
|
|
|
1169
1169
|
/**
|
|
1170
1170
|
* Create an upload
|
|
1171
1171
|
*
|
|
1172
|
-
* Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data
|
|
1172
|
+
* Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.
|
|
1173
1173
|
*/
|
|
1174
1174
|
export const fileCreateUpload = (options) => (options.client ?? client).post({
|
|
1175
1175
|
security: [{
|
|
@@ -1020,19 +1020,10 @@ export type OwnFileCreateFileRequest = {
|
|
|
1020
1020
|
*/
|
|
1021
1021
|
file: Blob | File;
|
|
1022
1022
|
/**
|
|
1023
|
-
* Purpose label stored with the file: user_data
|
|
1023
|
+
* Purpose label stored with the file: user_data or vision. The vision purpose accepts only PNG, JPEG, GIF and WebP images. Conversation image references require user_data.
|
|
1024
1024
|
*/
|
|
1025
|
-
purpose: 'user_data' | '
|
|
1025
|
+
purpose: 'user_data' | 'vision';
|
|
1026
1026
|
expires_after?: OwnFileFileExpirationAfter;
|
|
1027
|
-
/**
|
|
1028
|
-
* Own-face extensions. Use at most one expiry setting.
|
|
1029
|
-
*/
|
|
1030
|
-
praxis?: {
|
|
1031
|
-
/**
|
|
1032
|
-
* Lifetime in seconds after creation, from 3600 through 7776000. Send as the multipart field praxis[expires_in_seconds]; mutually exclusive with expires_after.
|
|
1033
|
-
*/
|
|
1034
|
-
expires_in_seconds?: number;
|
|
1035
|
-
};
|
|
1036
1027
|
};
|
|
1037
1028
|
/**
|
|
1038
1029
|
* OpenAIFile
|
|
@@ -1067,7 +1058,7 @@ export type OwnFileOpenAiFile = {
|
|
|
1067
1058
|
/**
|
|
1068
1059
|
* Upload purpose. Image references in conversations require user_data.
|
|
1069
1060
|
*/
|
|
1070
|
-
purpose: 'user_data' | '
|
|
1061
|
+
purpose: 'user_data' | 'vision';
|
|
1071
1062
|
/**
|
|
1072
1063
|
* Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.
|
|
1073
1064
|
*
|
|
@@ -1165,9 +1156,9 @@ export type OwnFilePraxisCreateUpload = {
|
|
|
1165
1156
|
*/
|
|
1166
1157
|
mime_type: string;
|
|
1167
1158
|
/**
|
|
1168
|
-
* Use user_data for conversation attachments,
|
|
1159
|
+
* Use user_data for conversation attachments, or vision for PNG, JPEG, GIF and WebP images.
|
|
1169
1160
|
*/
|
|
1170
|
-
purpose: 'user_data' | '
|
|
1161
|
+
purpose: 'user_data' | 'vision';
|
|
1171
1162
|
/**
|
|
1172
1163
|
* Optional expiry policy for the resulting file; omission retains the file until deletion.
|
|
1173
1164
|
*/
|
|
@@ -1212,9 +1203,9 @@ export type OwnFilePraxisUpload = {
|
|
|
1212
1203
|
*/
|
|
1213
1204
|
filename: string;
|
|
1214
1205
|
/**
|
|
1215
|
-
* File purpose: user_data for conversation attachments,
|
|
1206
|
+
* File purpose: user_data for conversation attachments, vision for images.
|
|
1216
1207
|
*/
|
|
1217
|
-
purpose: 'user_data' | '
|
|
1208
|
+
purpose: 'user_data' | 'vision';
|
|
1218
1209
|
/**
|
|
1219
1210
|
* Upload state: pending accepts parts; completed has a file; cancelled was cancelled; expired exceeded its one-hour lifetime.
|
|
1220
1211
|
*/
|
|
@@ -11084,7 +11075,7 @@ export type DatabaseNewField = {
|
|
|
11084
11075
|
*/
|
|
11085
11076
|
unique?: boolean;
|
|
11086
11077
|
/**
|
|
11087
|
-
* Whether to maintain an index for faster filters and ordering. Defaults to
|
|
11078
|
+
* Whether to maintain an index for faster filters and ordering. Defaults to false and is not allowed for json and link fields. At most 16 indexed or unique fields per table.
|
|
11088
11079
|
*/
|
|
11089
11080
|
indexed?: boolean;
|
|
11090
11081
|
/**
|
|
@@ -11119,7 +11110,7 @@ export type DatabaseNewField = {
|
|
|
11119
11110
|
*/
|
|
11120
11111
|
unique?: boolean;
|
|
11121
11112
|
/**
|
|
11122
|
-
* Whether to maintain an index for faster filters and ordering. Defaults to
|
|
11113
|
+
* Whether to maintain an index for faster filters and ordering. Defaults to false and is not allowed for json and link fields. At most 16 indexed or unique fields per table.
|
|
11123
11114
|
*/
|
|
11124
11115
|
indexed?: boolean;
|
|
11125
11116
|
/**
|
|
@@ -11159,7 +11150,7 @@ export type DatabaseNewField = {
|
|
|
11159
11150
|
*/
|
|
11160
11151
|
unique?: boolean;
|
|
11161
11152
|
/**
|
|
11162
|
-
* Whether to maintain an index for faster filters and ordering. Defaults to
|
|
11153
|
+
* Whether to maintain an index for faster filters and ordering. Defaults to false and is not allowed for json and link fields. At most 16 indexed or unique fields per table.
|
|
11163
11154
|
*/
|
|
11164
11155
|
indexed?: boolean;
|
|
11165
11156
|
/**
|
|
@@ -13871,7 +13862,7 @@ export type OwnFileFileExpirationAfter = {
|
|
|
13871
13862
|
*/
|
|
13872
13863
|
anchor: 'created_at';
|
|
13873
13864
|
/**
|
|
13874
|
-
* Lifetime in seconds after creation, from 3600 through
|
|
13865
|
+
* Lifetime in seconds after creation, from 3600 through 7776000. Send as expires_after[seconds].
|
|
13875
13866
|
*/
|
|
13876
13867
|
seconds: number;
|
|
13877
13868
|
};
|
|
@@ -22423,7 +22414,7 @@ export type MediaSemanticHit = {
|
|
|
22423
22414
|
*/
|
|
22424
22415
|
asset: MediaAsset;
|
|
22425
22416
|
/**
|
|
22426
|
-
* Ranking score: cosine similarity for semantic or visual search; normalized rank-fusion score for hybrid search. Higher values rank first.
|
|
22417
|
+
* Ranking score: cosine similarity for semantic or visual search; normalized rank-fusion score for hybrid search. Higher values rank first; hybrid scores are not probabilities or confidence.
|
|
22427
22418
|
*/
|
|
22428
22419
|
score: number;
|
|
22429
22420
|
/**
|
|
@@ -63022,7 +63013,7 @@ export type MediaUploadAssetData = {
|
|
|
63022
63013
|
*/
|
|
63023
63014
|
filename_override?: string;
|
|
63024
63015
|
/**
|
|
63025
|
-
* Allow replacing an existing public_id, preserving its asset_id and increasing its version. False returns the existing resource without replacing it; defaults to true.
|
|
63016
|
+
* Allow replacing an existing public_id, preserving its asset_id and increasing its version. Only the latest version is deliverable; old version URLs return 404. Create a new public_id to retain old deliveries. False returns the existing resource without replacing it; defaults to true.
|
|
63026
63017
|
*/
|
|
63027
63018
|
overwrite?: boolean;
|
|
63028
63019
|
/**
|
|
@@ -63119,7 +63110,7 @@ export type MediaImportAssetData = {
|
|
|
63119
63110
|
*/
|
|
63120
63111
|
body: {
|
|
63121
63112
|
/**
|
|
63122
|
-
* File ID to copy into this library; passed as the upload source instead of file bytes.
|
|
63113
|
+
* File ID to copy into this library; passed as the upload source instead of file bytes. This creates an independent public copy readable without authentication. Deleting the source File does not delete this asset; do not import confidential content.
|
|
63123
63114
|
*/
|
|
63124
63115
|
file_id: string;
|
|
63125
63116
|
/**
|
|
@@ -63155,7 +63146,7 @@ export type MediaImportAssetData = {
|
|
|
63155
63146
|
*/
|
|
63156
63147
|
filename_override?: string;
|
|
63157
63148
|
/**
|
|
63158
|
-
* Allow replacing an existing public_id, preserving its asset_id and increasing its version. False returns the existing resource without replacing it; defaults to true.
|
|
63149
|
+
* Allow replacing an existing public_id, preserving its asset_id and increasing its version. Only the latest version is deliverable; old version URLs return 404. Create a new public_id to retain old deliveries. False returns the existing resource without replacing it; defaults to true.
|
|
63159
63150
|
*/
|
|
63160
63151
|
overwrite?: boolean;
|
|
63161
63152
|
/**
|
|
@@ -63614,7 +63605,7 @@ export type MediaExpressionSearchData = {
|
|
|
63614
63605
|
*/
|
|
63615
63606
|
body: {
|
|
63616
63607
|
/**
|
|
63617
|
-
* Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets.
|
|
63608
|
+
* Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets. For business metadata use context.sku=KETTLE-RED AND context.revision=2; request with_field: ["context"] to include context.
|
|
63618
63609
|
*/
|
|
63619
63610
|
expression?: string;
|
|
63620
63611
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Praxis } from '../core/client.js';
|
|
2
2
|
import type { OwnFileOpenAiFile } from '../generated/types.gen.js';
|
|
3
3
|
export interface UploadFileOptions {
|
|
4
|
-
/** user_data for conversation attachments
|
|
5
|
-
purpose: 'user_data' | '
|
|
4
|
+
/** user_data for conversation attachments and documents; vision for PNG/JPEG/GIF/WebP. */
|
|
5
|
+
purpose: 'user_data' | 'vision';
|
|
6
6
|
/** Defaults to File.name, or upload for a Blob. */
|
|
7
7
|
filename?: string;
|
|
8
8
|
/** Fixed part size in bytes, 5 MiB–64 MB; defaults to 50 MiB. */
|
|
@@ -6732,7 +6732,7 @@ export declare const operations: readonly [{
|
|
|
6732
6732
|
readonly resource: "file.files";
|
|
6733
6733
|
readonly method: "create";
|
|
6734
6734
|
readonly summary: "Upload file";
|
|
6735
|
-
readonly description: "Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data
|
|
6735
|
+
readonly description: "Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File([\"Return within 23 days.\"], \"policy.txt\", { type: \"text/plain\" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–7776000). Without expiry, the file persists until deleted.";
|
|
6736
6736
|
readonly http: "POST";
|
|
6737
6737
|
readonly path: "/file/v1/files";
|
|
6738
6738
|
readonly streaming: "no";
|
|
@@ -6750,19 +6750,14 @@ export declare const operations: readonly [{
|
|
|
6750
6750
|
}, {
|
|
6751
6751
|
readonly name: "purpose";
|
|
6752
6752
|
readonly type: "string";
|
|
6753
|
-
readonly enum: readonly ["user_data", "
|
|
6753
|
+
readonly enum: readonly ["user_data", "vision"];
|
|
6754
6754
|
readonly required: true;
|
|
6755
|
-
readonly description: "Purpose label stored with the file: user_data
|
|
6755
|
+
readonly description: "Purpose label stored with the file: user_data or vision. The vision purpose accepts only PNG, JPEG, GIF and WebP images. Conversation image references require user_data.";
|
|
6756
6756
|
}, {
|
|
6757
6757
|
readonly name: "expires_after";
|
|
6758
6758
|
readonly type: "object";
|
|
6759
6759
|
readonly required: false;
|
|
6760
6760
|
readonly description: "Optional expiry relative to created_at. Files without an expiry persist until deleted.";
|
|
6761
|
-
}, {
|
|
6762
|
-
readonly name: "praxis";
|
|
6763
|
-
readonly type: "object";
|
|
6764
|
-
readonly required: false;
|
|
6765
|
-
readonly description: "Own-face extensions. Use at most one expiry setting.";
|
|
6766
6761
|
}];
|
|
6767
6762
|
};
|
|
6768
6763
|
}, {
|
|
@@ -6814,7 +6809,7 @@ export declare const operations: readonly [{
|
|
|
6814
6809
|
readonly resource: "file.uploads";
|
|
6815
6810
|
readonly method: "create";
|
|
6816
6811
|
readonly summary: "Create an upload";
|
|
6817
|
-
readonly description: "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data
|
|
6812
|
+
readonly description: "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.";
|
|
6818
6813
|
readonly http: "POST";
|
|
6819
6814
|
readonly path: "/file/v1/uploads";
|
|
6820
6815
|
readonly streaming: "no";
|
|
@@ -6841,9 +6836,9 @@ export declare const operations: readonly [{
|
|
|
6841
6836
|
}, {
|
|
6842
6837
|
readonly name: "purpose";
|
|
6843
6838
|
readonly type: "string";
|
|
6844
|
-
readonly enum: readonly ["user_data", "
|
|
6839
|
+
readonly enum: readonly ["user_data", "vision"];
|
|
6845
6840
|
readonly required: true;
|
|
6846
|
-
readonly description: "Use user_data for conversation attachments,
|
|
6841
|
+
readonly description: "Use user_data for conversation attachments, or vision for PNG, JPEG, GIF and WebP images.";
|
|
6847
6842
|
}, {
|
|
6848
6843
|
readonly name: "expires_after";
|
|
6849
6844
|
readonly type: "object";
|
|
@@ -7793,7 +7788,7 @@ export declare const operations: readonly [{
|
|
|
7793
7788
|
readonly name: "overwrite";
|
|
7794
7789
|
readonly type: "boolean";
|
|
7795
7790
|
readonly required: false;
|
|
7796
|
-
readonly description: "Allow replacing an existing public_id, preserving its asset_id and increasing its version. False returns the existing resource without replacing it; defaults to true.";
|
|
7791
|
+
readonly description: "Allow replacing an existing public_id, preserving its asset_id and increasing its version. Only the latest version is deliverable; old version URLs return 404. Create a new public_id to retain old deliveries. False returns the existing resource without replacing it; defaults to true.";
|
|
7797
7792
|
}, {
|
|
7798
7793
|
readonly name: "tags";
|
|
7799
7794
|
readonly type: "object";
|
|
@@ -7838,7 +7833,7 @@ export declare const operations: readonly [{
|
|
|
7838
7833
|
readonly name: "file_id";
|
|
7839
7834
|
readonly type: "string";
|
|
7840
7835
|
readonly required: true;
|
|
7841
|
-
readonly description: "File ID to copy into this library; passed as the upload source instead of file bytes.";
|
|
7836
|
+
readonly description: "File ID to copy into this library; passed as the upload source instead of file bytes. This creates an independent public copy readable without authentication. Deleting the source File does not delete this asset; do not import confidential content.";
|
|
7842
7837
|
}, {
|
|
7843
7838
|
readonly name: "public_id";
|
|
7844
7839
|
readonly type: "string";
|
|
@@ -7883,7 +7878,7 @@ export declare const operations: readonly [{
|
|
|
7883
7878
|
readonly name: "overwrite";
|
|
7884
7879
|
readonly type: "boolean";
|
|
7885
7880
|
readonly required: false;
|
|
7886
|
-
readonly description: "Allow replacing an existing public_id, preserving its asset_id and increasing its version. False returns the existing resource without replacing it; defaults to true.";
|
|
7881
|
+
readonly description: "Allow replacing an existing public_id, preserving its asset_id and increasing its version. Only the latest version is deliverable; old version URLs return 404. Create a new public_id to retain old deliveries. False returns the existing resource without replacing it; defaults to true.";
|
|
7887
7882
|
}, {
|
|
7888
7883
|
readonly name: "tags";
|
|
7889
7884
|
readonly type: "object";
|
|
@@ -8292,7 +8287,7 @@ export declare const operations: readonly [{
|
|
|
8292
8287
|
readonly name: "expression";
|
|
8293
8288
|
readonly type: "string";
|
|
8294
8289
|
readonly required: false;
|
|
8295
|
-
readonly description: "Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets.";
|
|
8290
|
+
readonly description: "Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets. For business metadata use context.sku=KETTLE-RED AND context.revision=2; request with_field: [\"context\"] to include context.";
|
|
8296
8291
|
}, {
|
|
8297
8292
|
readonly name: "sort_by";
|
|
8298
8293
|
readonly type: "array";
|
|
@@ -8289,7 +8289,7 @@ export const operations = [
|
|
|
8289
8289
|
"resource": "file.files",
|
|
8290
8290
|
"method": "create",
|
|
8291
8291
|
"summary": "Upload file",
|
|
8292
|
-
"description": "Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data
|
|
8292
|
+
"description": "Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File([\"Return within 23 days.\"], \"policy.txt\", { type: \"text/plain\" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–7776000). Without expiry, the file persists until deleted.",
|
|
8293
8293
|
"http": "POST",
|
|
8294
8294
|
"path": "/file/v1/files",
|
|
8295
8295
|
"streaming": "no",
|
|
@@ -8311,23 +8311,16 @@ export const operations = [
|
|
|
8311
8311
|
"type": "string",
|
|
8312
8312
|
"enum": [
|
|
8313
8313
|
"user_data",
|
|
8314
|
-
"assistants",
|
|
8315
8314
|
"vision"
|
|
8316
8315
|
],
|
|
8317
8316
|
"required": true,
|
|
8318
|
-
"description": "Purpose label stored with the file: user_data
|
|
8317
|
+
"description": "Purpose label stored with the file: user_data or vision. The vision purpose accepts only PNG, JPEG, GIF and WebP images. Conversation image references require user_data."
|
|
8319
8318
|
},
|
|
8320
8319
|
{
|
|
8321
8320
|
"name": "expires_after",
|
|
8322
8321
|
"type": "object",
|
|
8323
8322
|
"required": false,
|
|
8324
8323
|
"description": "Optional expiry relative to created_at. Files without an expiry persist until deleted."
|
|
8325
|
-
},
|
|
8326
|
-
{
|
|
8327
|
-
"name": "praxis",
|
|
8328
|
-
"type": "object",
|
|
8329
|
-
"required": false,
|
|
8330
|
-
"description": "Own-face extensions. Use at most one expiry setting."
|
|
8331
8324
|
}
|
|
8332
8325
|
]
|
|
8333
8326
|
}
|
|
@@ -8390,7 +8383,7 @@ export const operations = [
|
|
|
8390
8383
|
"resource": "file.uploads",
|
|
8391
8384
|
"method": "create",
|
|
8392
8385
|
"summary": "Create an upload",
|
|
8393
|
-
"description": "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data
|
|
8386
|
+
"description": "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.",
|
|
8394
8387
|
"http": "POST",
|
|
8395
8388
|
"path": "/file/v1/uploads",
|
|
8396
8389
|
"streaming": "no",
|
|
@@ -8423,11 +8416,10 @@ export const operations = [
|
|
|
8423
8416
|
"type": "string",
|
|
8424
8417
|
"enum": [
|
|
8425
8418
|
"user_data",
|
|
8426
|
-
"assistants",
|
|
8427
8419
|
"vision"
|
|
8428
8420
|
],
|
|
8429
8421
|
"required": true,
|
|
8430
|
-
"description": "Use user_data for conversation attachments,
|
|
8422
|
+
"description": "Use user_data for conversation attachments, or vision for PNG, JPEG, GIF and WebP images."
|
|
8431
8423
|
},
|
|
8432
8424
|
{
|
|
8433
8425
|
"name": "expires_after",
|
|
@@ -9607,7 +9599,7 @@ export const operations = [
|
|
|
9607
9599
|
"name": "overwrite",
|
|
9608
9600
|
"type": "boolean",
|
|
9609
9601
|
"required": false,
|
|
9610
|
-
"description": "Allow replacing an existing public_id, preserving its asset_id and increasing its version. False returns the existing resource without replacing it; defaults to true."
|
|
9602
|
+
"description": "Allow replacing an existing public_id, preserving its asset_id and increasing its version. Only the latest version is deliverable; old version URLs return 404. Create a new public_id to retain old deliveries. False returns the existing resource without replacing it; defaults to true."
|
|
9611
9603
|
},
|
|
9612
9604
|
{
|
|
9613
9605
|
"name": "tags",
|
|
@@ -9666,7 +9658,7 @@ export const operations = [
|
|
|
9666
9658
|
"name": "file_id",
|
|
9667
9659
|
"type": "string",
|
|
9668
9660
|
"required": true,
|
|
9669
|
-
"description": "File ID to copy into this library; passed as the upload source instead of file bytes."
|
|
9661
|
+
"description": "File ID to copy into this library; passed as the upload source instead of file bytes. This creates an independent public copy readable without authentication. Deleting the source File does not delete this asset; do not import confidential content."
|
|
9670
9662
|
},
|
|
9671
9663
|
{
|
|
9672
9664
|
"name": "public_id",
|
|
@@ -9720,7 +9712,7 @@ export const operations = [
|
|
|
9720
9712
|
"name": "overwrite",
|
|
9721
9713
|
"type": "boolean",
|
|
9722
9714
|
"required": false,
|
|
9723
|
-
"description": "Allow replacing an existing public_id, preserving its asset_id and increasing its version. False returns the existing resource without replacing it; defaults to true."
|
|
9715
|
+
"description": "Allow replacing an existing public_id, preserving its asset_id and increasing its version. Only the latest version is deliverable; old version URLs return 404. Create a new public_id to retain old deliveries. False returns the existing resource without replacing it; defaults to true."
|
|
9724
9716
|
},
|
|
9725
9717
|
{
|
|
9726
9718
|
"name": "tags",
|
|
@@ -10237,7 +10229,7 @@ export const operations = [
|
|
|
10237
10229
|
"name": "expression",
|
|
10238
10230
|
"type": "string",
|
|
10239
10231
|
"required": false,
|
|
10240
|
-
"description": "Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets."
|
|
10232
|
+
"description": "Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets. For business metadata use context.sku=KETTLE-RED AND context.revision=2; request with_field: [\"context\"] to include context."
|
|
10241
10233
|
},
|
|
10242
10234
|
{
|
|
10243
10235
|
"name": "sort_by",
|