Initial commit: KidsAI Explorer with complete functionality

- Complete KidsAI Explorer application
- Multi-language support (English/German)
- AI-powered educational guidance using OpenAI
- Interactive chat interface for children
- Proper placeholder translation fixes
- Mobile-responsive design
- Educational framework for critical thinking
This commit is contained in:
root
2025-07-13 16:59:42 +02:00
commit 500bd192d5
2450 changed files with 202563 additions and 0 deletions

3
node_modules/openai/resources/uploads/index.d.mts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export { Parts, type UploadPart, type PartCreateParams } from "./parts.mjs";
export { Uploads, type Upload, type UploadCreateParams, type UploadCompleteParams } from "./uploads.mjs";
//# sourceMappingURL=index.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/uploads/index.ts"],"names":[],"mappings":"OAEO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE;OACjD,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,EAAE"}

3
node_modules/openai/resources/uploads/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export { Parts, type UploadPart, type PartCreateParams } from "./parts.js";
export { Uploads, type Upload, type UploadCreateParams, type UploadCompleteParams } from "./uploads.js";
//# sourceMappingURL=index.d.ts.map

1
node_modules/openai/resources/uploads/index.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/uploads/index.ts"],"names":[],"mappings":"OAEO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE;OACjD,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,EAAE"}

9
node_modules/openai/resources/uploads/index.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Uploads = exports.Parts = void 0;
var parts_1 = require("./parts.js");
Object.defineProperty(exports, "Parts", { enumerable: true, get: function () { return parts_1.Parts; } });
var uploads_1 = require("./uploads.js");
Object.defineProperty(exports, "Uploads", { enumerable: true, get: function () { return uploads_1.Uploads; } });
//# sourceMappingURL=index.js.map

1
node_modules/openai/resources/uploads/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/uploads/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCAAwE;AAA/D,8FAAA,KAAK,OAAA;AACd,wCAAqG;AAA5F,kGAAA,OAAO,OAAA"}

4
node_modules/openai/resources/uploads/index.mjs generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export { Parts } from "./parts.mjs";
export { Uploads } from "./uploads.mjs";
//# sourceMappingURL=index.mjs.map

1
node_modules/openai/resources/uploads/index.mjs.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/uploads/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,KAAK,EAA0C;OACjD,EAAE,OAAO,EAAmE"}

51
node_modules/openai/resources/uploads/parts.d.mts generated vendored Normal file
View File

@@ -0,0 +1,51 @@
import { APIResource } from "../../core/resource.mjs";
import { APIPromise } from "../../core/api-promise.mjs";
import { type Uploadable } from "../../core/uploads.mjs";
import { RequestOptions } from "../../internal/request-options.mjs";
export declare class Parts extends APIResource {
/**
* Adds a
* [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an
* [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object.
* A Part represents a chunk of bytes from the file you are trying to upload.
*
* Each Part can be at most 64 MB, and you can add Parts until you hit the Upload
* maximum of 8 GB.
*
* It is possible to add multiple Parts in parallel. You can decide the intended
* order of the Parts when you
* [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).
*/
create(uploadID: string, body: PartCreateParams, options?: RequestOptions): APIPromise<UploadPart>;
}
/**
* The upload Part represents a chunk of bytes we can add to an Upload object.
*/
export interface UploadPart {
/**
* The upload Part unique identifier, which can be referenced in API endpoints.
*/
id: string;
/**
* The Unix timestamp (in seconds) for when the Part was created.
*/
created_at: number;
/**
* The object type, which is always `upload.part`.
*/
object: 'upload.part';
/**
* The ID of the Upload object that this Part was added to.
*/
upload_id: string;
}
export interface PartCreateParams {
/**
* The chunk of bytes for this Part.
*/
data: Uploadable;
}
export declare namespace Parts {
export { type UploadPart as UploadPart, type PartCreateParams as PartCreateParams };
}
//# sourceMappingURL=parts.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"parts.d.mts","sourceRoot":"","sources":["../../src/resources/uploads/parts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;CAMnG;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,UAAU,IAAI,UAAU,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACrF"}

51
node_modules/openai/resources/uploads/parts.d.ts generated vendored Normal file
View File

@@ -0,0 +1,51 @@
import { APIResource } from "../../core/resource.js";
import { APIPromise } from "../../core/api-promise.js";
import { type Uploadable } from "../../core/uploads.js";
import { RequestOptions } from "../../internal/request-options.js";
export declare class Parts extends APIResource {
/**
* Adds a
* [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an
* [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object.
* A Part represents a chunk of bytes from the file you are trying to upload.
*
* Each Part can be at most 64 MB, and you can add Parts until you hit the Upload
* maximum of 8 GB.
*
* It is possible to add multiple Parts in parallel. You can decide the intended
* order of the Parts when you
* [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).
*/
create(uploadID: string, body: PartCreateParams, options?: RequestOptions): APIPromise<UploadPart>;
}
/**
* The upload Part represents a chunk of bytes we can add to an Upload object.
*/
export interface UploadPart {
/**
* The upload Part unique identifier, which can be referenced in API endpoints.
*/
id: string;
/**
* The Unix timestamp (in seconds) for when the Part was created.
*/
created_at: number;
/**
* The object type, which is always `upload.part`.
*/
object: 'upload.part';
/**
* The ID of the Upload object that this Part was added to.
*/
upload_id: string;
}
export interface PartCreateParams {
/**
* The chunk of bytes for this Part.
*/
data: Uploadable;
}
export declare namespace Parts {
export { type UploadPart as UploadPart, type PartCreateParams as PartCreateParams };
}
//# sourceMappingURL=parts.d.ts.map

1
node_modules/openai/resources/uploads/parts.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../src/resources/uploads/parts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;CAMnG;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,UAAU,IAAI,UAAU,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACrF"}

27
node_modules/openai/resources/uploads/parts.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Parts = void 0;
const resource_1 = require("../../core/resource.js");
const uploads_1 = require("../../internal/uploads.js");
const path_1 = require("../../internal/utils/path.js");
class Parts extends resource_1.APIResource {
/**
* Adds a
* [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an
* [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object.
* A Part represents a chunk of bytes from the file you are trying to upload.
*
* Each Part can be at most 64 MB, and you can add Parts until you hit the Upload
* maximum of 8 GB.
*
* It is possible to add multiple Parts in parallel. You can decide the intended
* order of the Parts when you
* [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).
*/
create(uploadID, body, options) {
return this._client.post((0, path_1.path) `/uploads/${uploadID}/parts`, (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
}
}
exports.Parts = Parts;
//# sourceMappingURL=parts.js.map

1
node_modules/openai/resources/uploads/parts.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"parts.js","sourceRoot":"","sources":["../../src/resources/uploads/parts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAqE;AACrE,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,QAAgB,EAAE,IAAsB,EAAE,OAAwB;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAA,WAAI,EAAA,YAAY,QAAQ,QAAQ,EAChC,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF;AApBD,sBAoBC"}

23
node_modules/openai/resources/uploads/parts.mjs generated vendored Normal file
View File

@@ -0,0 +1,23 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { multipartFormRequestOptions } from "../../internal/uploads.mjs";
import { path } from "../../internal/utils/path.mjs";
export class Parts extends APIResource {
/**
* Adds a
* [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an
* [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object.
* A Part represents a chunk of bytes from the file you are trying to upload.
*
* Each Part can be at most 64 MB, and you can add Parts until you hit the Upload
* maximum of 8 GB.
*
* It is possible to add multiple Parts in parallel. You can decide the intended
* order of the Parts when you
* [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).
*/
create(uploadID, body, options) {
return this._client.post(path `/uploads/${uploadID}/parts`, multipartFormRequestOptions({ body, ...options }, this._client));
}
}
//# sourceMappingURL=parts.mjs.map

1
node_modules/openai/resources/uploads/parts.mjs.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"parts.mjs","sourceRoot":"","sources":["../../src/resources/uploads/parts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,QAAgB,EAAE,IAAsB,EAAE,OAAwB;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAI,CAAA,YAAY,QAAQ,QAAQ,EAChC,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF"}

134
node_modules/openai/resources/uploads/uploads.d.mts generated vendored Normal file
View File

@@ -0,0 +1,134 @@
import { APIResource } from "../../core/resource.mjs";
import * as FilesAPI from "../files.mjs";
import * as PartsAPI from "./parts.mjs";
import { PartCreateParams, Parts, UploadPart } from "./parts.mjs";
import { APIPromise } from "../../core/api-promise.mjs";
import { RequestOptions } from "../../internal/request-options.mjs";
export declare class Uploads extends APIResource {
parts: PartsAPI.Parts;
/**
* Creates an intermediate
* [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object
* that you can add
* [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.
* Currently, an Upload can accept at most 8 GB in total and expires after an hour
* after you create it.
*
* Once you complete the Upload, we will create a
* [File](https://platform.openai.com/docs/api-reference/files/object) object that
* contains all the parts you uploaded. This File is usable in the rest of our
* platform as a regular File object.
*
* For certain `purpose` values, the correct `mime_type` must be specified. Please
* refer to documentation for the
* [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).
*
* For guidance on the proper filename extensions for each purpose, please follow
* the documentation on
* [creating a File](https://platform.openai.com/docs/api-reference/files/create).
*/
create(body: UploadCreateParams, options?: RequestOptions): APIPromise<Upload>;
/**
* Cancels the Upload. No Parts may be added after an Upload is cancelled.
*/
cancel(uploadID: string, options?: RequestOptions): APIPromise<Upload>;
/**
* Completes the
* [Upload](https://platform.openai.com/docs/api-reference/uploads/object).
*
* Within the returned Upload object, there is a nested
* [File](https://platform.openai.com/docs/api-reference/files/object) object that
* is ready to use in the rest of the platform.
*
* You can specify the order of the Parts by passing in an ordered list of the Part
* IDs.
*
* The number of bytes uploaded upon completion must match the number of bytes
* initially specified when creating the Upload object. No Parts may be added after
* an Upload is completed.
*/
complete(uploadID: string, body: UploadCompleteParams, options?: RequestOptions): APIPromise<Upload>;
}
/**
* The Upload object can accept byte chunks in the form of Parts.
*/
export interface Upload {
/**
* The Upload unique identifier, which can be referenced in API endpoints.
*/
id: string;
/**
* The intended number of bytes to be uploaded.
*/
bytes: number;
/**
* The Unix timestamp (in seconds) for when the Upload was created.
*/
created_at: number;
/**
* The Unix timestamp (in seconds) for when the Upload will expire.
*/
expires_at: number;
/**
* The name of the file to be uploaded.
*/
filename: string;
/**
* The object type, which is always "upload".
*/
object: 'upload';
/**
* The intended purpose of the file.
* [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose)
* for acceptable values.
*/
purpose: string;
/**
* The status of the Upload.
*/
status: 'pending' | 'completed' | 'cancelled' | 'expired';
/**
* The `File` object represents a document that has been uploaded to OpenAI.
*/
file?: FilesAPI.FileObject | null;
}
export interface UploadCreateParams {
/**
* The number of bytes in the file you are uploading.
*/
bytes: number;
/**
* The name of the file to upload.
*/
filename: string;
/**
* The MIME type of the file.
*
* This must fall within the supported MIME types for your file purpose. See the
* supported MIME types for assistants and vision.
*/
mime_type: string;
/**
* The intended purpose of the uploaded file.
*
* See the
* [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose).
*/
purpose: FilesAPI.FilePurpose;
}
export interface UploadCompleteParams {
/**
* The ordered list of Part IDs.
*/
part_ids: Array<string>;
/**
* The optional md5 checksum for the file contents to verify if the bytes uploaded
* matches what you expect.
*/
md5?: string;
}
export declare namespace Uploads {
export { type Upload as Upload, type UploadCreateParams as UploadCreateParams, type UploadCompleteParams as UploadCompleteParams, };
export { Parts as Parts, type UploadPart as UploadPart, type PartCreateParams as PartCreateParams };
}
//# sourceMappingURL=uploads.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../../src/resources/uploads/uploads.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,KAAK,QAAQ;OACb,EAAE,gBAAgB,EAAE,KAAK,EAAE,UAAU,EAAE;OACvC,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAI9E;;OAEG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAItE;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAGrG;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC;IAEjB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC;IAE1D;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,OAAO,EAAE,QAAQ,CAAC,WAAW,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAExB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAID,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,KAAK,UAAU,IAAI,UAAU,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACrG"}

134
node_modules/openai/resources/uploads/uploads.d.ts generated vendored Normal file
View File

@@ -0,0 +1,134 @@
import { APIResource } from "../../core/resource.js";
import * as FilesAPI from "../files.js";
import * as PartsAPI from "./parts.js";
import { PartCreateParams, Parts, UploadPart } from "./parts.js";
import { APIPromise } from "../../core/api-promise.js";
import { RequestOptions } from "../../internal/request-options.js";
export declare class Uploads extends APIResource {
parts: PartsAPI.Parts;
/**
* Creates an intermediate
* [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object
* that you can add
* [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.
* Currently, an Upload can accept at most 8 GB in total and expires after an hour
* after you create it.
*
* Once you complete the Upload, we will create a
* [File](https://platform.openai.com/docs/api-reference/files/object) object that
* contains all the parts you uploaded. This File is usable in the rest of our
* platform as a regular File object.
*
* For certain `purpose` values, the correct `mime_type` must be specified. Please
* refer to documentation for the
* [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).
*
* For guidance on the proper filename extensions for each purpose, please follow
* the documentation on
* [creating a File](https://platform.openai.com/docs/api-reference/files/create).
*/
create(body: UploadCreateParams, options?: RequestOptions): APIPromise<Upload>;
/**
* Cancels the Upload. No Parts may be added after an Upload is cancelled.
*/
cancel(uploadID: string, options?: RequestOptions): APIPromise<Upload>;
/**
* Completes the
* [Upload](https://platform.openai.com/docs/api-reference/uploads/object).
*
* Within the returned Upload object, there is a nested
* [File](https://platform.openai.com/docs/api-reference/files/object) object that
* is ready to use in the rest of the platform.
*
* You can specify the order of the Parts by passing in an ordered list of the Part
* IDs.
*
* The number of bytes uploaded upon completion must match the number of bytes
* initially specified when creating the Upload object. No Parts may be added after
* an Upload is completed.
*/
complete(uploadID: string, body: UploadCompleteParams, options?: RequestOptions): APIPromise<Upload>;
}
/**
* The Upload object can accept byte chunks in the form of Parts.
*/
export interface Upload {
/**
* The Upload unique identifier, which can be referenced in API endpoints.
*/
id: string;
/**
* The intended number of bytes to be uploaded.
*/
bytes: number;
/**
* The Unix timestamp (in seconds) for when the Upload was created.
*/
created_at: number;
/**
* The Unix timestamp (in seconds) for when the Upload will expire.
*/
expires_at: number;
/**
* The name of the file to be uploaded.
*/
filename: string;
/**
* The object type, which is always "upload".
*/
object: 'upload';
/**
* The intended purpose of the file.
* [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose)
* for acceptable values.
*/
purpose: string;
/**
* The status of the Upload.
*/
status: 'pending' | 'completed' | 'cancelled' | 'expired';
/**
* The `File` object represents a document that has been uploaded to OpenAI.
*/
file?: FilesAPI.FileObject | null;
}
export interface UploadCreateParams {
/**
* The number of bytes in the file you are uploading.
*/
bytes: number;
/**
* The name of the file to upload.
*/
filename: string;
/**
* The MIME type of the file.
*
* This must fall within the supported MIME types for your file purpose. See the
* supported MIME types for assistants and vision.
*/
mime_type: string;
/**
* The intended purpose of the uploaded file.
*
* See the
* [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose).
*/
purpose: FilesAPI.FilePurpose;
}
export interface UploadCompleteParams {
/**
* The ordered list of Part IDs.
*/
part_ids: Array<string>;
/**
* The optional md5 checksum for the file contents to verify if the bytes uploaded
* matches what you expect.
*/
md5?: string;
}
export declare namespace Uploads {
export { type Upload as Upload, type UploadCreateParams as UploadCreateParams, type UploadCompleteParams as UploadCompleteParams, };
export { Parts as Parts, type UploadPart as UploadPart, type PartCreateParams as PartCreateParams };
}
//# sourceMappingURL=uploads.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../../src/resources/uploads/uploads.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,KAAK,QAAQ;OACb,EAAE,gBAAgB,EAAE,KAAK,EAAE,UAAU,EAAE;OACvC,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAI9E;;OAEG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAItE;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAGrG;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC;IAEjB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC;IAE1D;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,OAAO,EAAE,QAAQ,CAAC,WAAW,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAExB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAID,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,KAAK,UAAU,IAAI,UAAU,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACrG"}

66
node_modules/openai/resources/uploads/uploads.js generated vendored Normal file
View File

@@ -0,0 +1,66 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Uploads = void 0;
const tslib_1 = require("../../internal/tslib.js");
const resource_1 = require("../../core/resource.js");
const PartsAPI = tslib_1.__importStar(require("./parts.js"));
const parts_1 = require("./parts.js");
const path_1 = require("../../internal/utils/path.js");
class Uploads extends resource_1.APIResource {
constructor() {
super(...arguments);
this.parts = new PartsAPI.Parts(this._client);
}
/**
* Creates an intermediate
* [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object
* that you can add
* [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.
* Currently, an Upload can accept at most 8 GB in total and expires after an hour
* after you create it.
*
* Once you complete the Upload, we will create a
* [File](https://platform.openai.com/docs/api-reference/files/object) object that
* contains all the parts you uploaded. This File is usable in the rest of our
* platform as a regular File object.
*
* For certain `purpose` values, the correct `mime_type` must be specified. Please
* refer to documentation for the
* [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).
*
* For guidance on the proper filename extensions for each purpose, please follow
* the documentation on
* [creating a File](https://platform.openai.com/docs/api-reference/files/create).
*/
create(body, options) {
return this._client.post('/uploads', { body, ...options });
}
/**
* Cancels the Upload. No Parts may be added after an Upload is cancelled.
*/
cancel(uploadID, options) {
return this._client.post((0, path_1.path) `/uploads/${uploadID}/cancel`, options);
}
/**
* Completes the
* [Upload](https://platform.openai.com/docs/api-reference/uploads/object).
*
* Within the returned Upload object, there is a nested
* [File](https://platform.openai.com/docs/api-reference/files/object) object that
* is ready to use in the rest of the platform.
*
* You can specify the order of the Parts by passing in an ordered list of the Part
* IDs.
*
* The number of bytes uploaded upon completion must match the number of bytes
* initially specified when creating the Upload object. No Parts may be added after
* an Upload is completed.
*/
complete(uploadID, body, options) {
return this._client.post((0, path_1.path) `/uploads/${uploadID}/complete`, { body, ...options });
}
}
exports.Uploads = Uploads;
Uploads.Parts = parts_1.Parts;
//# sourceMappingURL=uploads.js.map

1
node_modules/openai/resources/uploads/uploads.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../../src/resources/uploads/uploads.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6DAAoC;AACpC,sCAA8D;AAG9D,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoD3D,CAAC;IAlDC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,QAAgB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,SAAS,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,QAAgB,EAAE,IAA0B,EAAE,OAAwB;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;CACF;AArDD,0BAqDC;AA+FD,OAAO,CAAC,KAAK,GAAG,aAAK,CAAC"}

61
node_modules/openai/resources/uploads/uploads.mjs generated vendored Normal file
View File

@@ -0,0 +1,61 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import * as PartsAPI from "./parts.mjs";
import { Parts } from "./parts.mjs";
import { path } from "../../internal/utils/path.mjs";
export class Uploads extends APIResource {
constructor() {
super(...arguments);
this.parts = new PartsAPI.Parts(this._client);
}
/**
* Creates an intermediate
* [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object
* that you can add
* [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.
* Currently, an Upload can accept at most 8 GB in total and expires after an hour
* after you create it.
*
* Once you complete the Upload, we will create a
* [File](https://platform.openai.com/docs/api-reference/files/object) object that
* contains all the parts you uploaded. This File is usable in the rest of our
* platform as a regular File object.
*
* For certain `purpose` values, the correct `mime_type` must be specified. Please
* refer to documentation for the
* [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).
*
* For guidance on the proper filename extensions for each purpose, please follow
* the documentation on
* [creating a File](https://platform.openai.com/docs/api-reference/files/create).
*/
create(body, options) {
return this._client.post('/uploads', { body, ...options });
}
/**
* Cancels the Upload. No Parts may be added after an Upload is cancelled.
*/
cancel(uploadID, options) {
return this._client.post(path `/uploads/${uploadID}/cancel`, options);
}
/**
* Completes the
* [Upload](https://platform.openai.com/docs/api-reference/uploads/object).
*
* Within the returned Upload object, there is a nested
* [File](https://platform.openai.com/docs/api-reference/files/object) object that
* is ready to use in the rest of the platform.
*
* You can specify the order of the Parts by passing in an ordered list of the Part
* IDs.
*
* The number of bytes uploaded upon completion must match the number of bytes
* initially specified when creating the Upload object. No Parts may be added after
* an Upload is completed.
*/
complete(uploadID, body, options) {
return this._client.post(path `/uploads/${uploadID}/complete`, { body, ...options });
}
}
Uploads.Parts = Parts;
//# sourceMappingURL=uploads.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["../../src/resources/uploads/uploads.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,EAAoB,KAAK,EAAc;OAGvC,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoD3D,CAAC;IAlDC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,QAAgB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,YAAY,QAAQ,SAAS,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,QAAgB,EAAE,IAA0B,EAAE,OAAwB;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,YAAY,QAAQ,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;CACF;AA+FD,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC"}