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

View File

@@ -0,0 +1,10 @@
import { APIResource } from "../../../core/resource.mjs";
import * as PermissionsAPI from "./permissions.mjs";
import { PermissionCreateParams, PermissionCreateResponse, PermissionCreateResponsesPage, PermissionDeleteParams, PermissionDeleteResponse, PermissionRetrieveParams, PermissionRetrieveResponse, Permissions } from "./permissions.mjs";
export declare class Checkpoints extends APIResource {
permissions: PermissionsAPI.Permissions;
}
export declare namespace Checkpoints {
export { Permissions as Permissions, type PermissionCreateResponse as PermissionCreateResponse, type PermissionRetrieveResponse as PermissionRetrieveResponse, type PermissionDeleteResponse as PermissionDeleteResponse, type PermissionCreateResponsesPage as PermissionCreateResponsesPage, type PermissionCreateParams as PermissionCreateParams, type PermissionRetrieveParams as PermissionRetrieveParams, type PermissionDeleteParams as PermissionDeleteParams, };
}
//# sourceMappingURL=checkpoints.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"checkpoints.d.mts","sourceRoot":"","sources":["../../../src/resources/fine-tuning/checkpoints/checkpoints.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,wBAAwB,EACxB,6BAA6B,EAC7B,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,WAAW,EACZ;AAED,qBAAa,WAAY,SAAQ,WAAW;IAC1C,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;CACxF;AAID,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}

View File

@@ -0,0 +1,10 @@
import { APIResource } from "../../../core/resource.js";
import * as PermissionsAPI from "./permissions.js";
import { PermissionCreateParams, PermissionCreateResponse, PermissionCreateResponsesPage, PermissionDeleteParams, PermissionDeleteResponse, PermissionRetrieveParams, PermissionRetrieveResponse, Permissions } from "./permissions.js";
export declare class Checkpoints extends APIResource {
permissions: PermissionsAPI.Permissions;
}
export declare namespace Checkpoints {
export { Permissions as Permissions, type PermissionCreateResponse as PermissionCreateResponse, type PermissionRetrieveResponse as PermissionRetrieveResponse, type PermissionDeleteResponse as PermissionDeleteResponse, type PermissionCreateResponsesPage as PermissionCreateResponsesPage, type PermissionCreateParams as PermissionCreateParams, type PermissionRetrieveParams as PermissionRetrieveParams, type PermissionDeleteParams as PermissionDeleteParams, };
}
//# sourceMappingURL=checkpoints.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"checkpoints.d.ts","sourceRoot":"","sources":["../../../src/resources/fine-tuning/checkpoints/checkpoints.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,wBAAwB,EACxB,6BAA6B,EAC7B,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,WAAW,EACZ;AAED,qBAAa,WAAY,SAAQ,WAAW;IAC1C,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;CACxF;AAID,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}

View File

@@ -0,0 +1,17 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Checkpoints = void 0;
const tslib_1 = require("../../../internal/tslib.js");
const resource_1 = require("../../../core/resource.js");
const PermissionsAPI = tslib_1.__importStar(require("./permissions.js"));
const permissions_1 = require("./permissions.js");
class Checkpoints extends resource_1.APIResource {
constructor() {
super(...arguments);
this.permissions = new PermissionsAPI.Permissions(this._client);
}
}
exports.Checkpoints = Checkpoints;
Checkpoints.Permissions = permissions_1.Permissions;
//# sourceMappingURL=checkpoints.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"checkpoints.js","sourceRoot":"","sources":["../../../src/resources/fine-tuning/checkpoints/checkpoints.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,yEAAgD;AAChD,kDASuB;AAEvB,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzF,CAAC;CAAA;AAFD,kCAEC;AAED,WAAW,CAAC,WAAW,GAAG,yBAAW,CAAC"}

View File

@@ -0,0 +1,12 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import * as PermissionsAPI from "./permissions.mjs";
import { Permissions, } from "./permissions.mjs";
export class Checkpoints extends APIResource {
constructor() {
super(...arguments);
this.permissions = new PermissionsAPI.Permissions(this._client);
}
}
Checkpoints.Permissions = Permissions;
//# sourceMappingURL=checkpoints.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"checkpoints.mjs","sourceRoot":"","sources":["../../../src/resources/fine-tuning/checkpoints/checkpoints.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EAQL,WAAW,GACZ;AAED,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzF,CAAC;CAAA;AAED,WAAW,CAAC,WAAW,GAAG,WAAW,CAAC"}

View File

@@ -0,0 +1,3 @@
export { Checkpoints } from "./checkpoints.mjs";
export { Permissions, type PermissionCreateResponse, type PermissionRetrieveResponse, type PermissionDeleteResponse, type PermissionCreateParams, type PermissionRetrieveParams, type PermissionDeleteParams, type PermissionCreateResponsesPage, } from "./permissions.mjs";
//# sourceMappingURL=index.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/fine-tuning/checkpoints/index.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,GACnC"}

View File

@@ -0,0 +1,3 @@
export { Checkpoints } from "./checkpoints.js";
export { Permissions, type PermissionCreateResponse, type PermissionRetrieveResponse, type PermissionDeleteResponse, type PermissionCreateParams, type PermissionRetrieveParams, type PermissionDeleteParams, type PermissionCreateResponsesPage, } from "./permissions.js";
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/fine-tuning/checkpoints/index.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,GACnC"}

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.Permissions = exports.Checkpoints = void 0;
var checkpoints_1 = require("./checkpoints.js");
Object.defineProperty(exports, "Checkpoints", { enumerable: true, get: function () { return checkpoints_1.Checkpoints; } });
var permissions_1 = require("./permissions.js");
Object.defineProperty(exports, "Permissions", { enumerable: true, get: function () { return permissions_1.Permissions; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/fine-tuning/checkpoints/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,gDASuB;AARrB,0GAAA,WAAW,OAAA"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/fine-tuning/checkpoints/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EACL,WAAW,GAQZ"}

View File

@@ -0,0 +1,160 @@
import { APIResource } from "../../../core/resource.mjs";
import { APIPromise } from "../../../core/api-promise.mjs";
import { Page, PagePromise } from "../../../core/pagination.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class Permissions extends APIResource {
/**
* **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
*
* This enables organization owners to share fine-tuned models with other projects
* in their organization.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const permissionCreateResponse of client.fineTuning.checkpoints.permissions.create(
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',
* { project_ids: ['string'] },
* )) {
* // ...
* }
* ```
*/
create(fineTunedModelCheckpoint: string, body: PermissionCreateParams, options?: RequestOptions): PagePromise<PermissionCreateResponsesPage, PermissionCreateResponse>;
/**
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
*
* Organization owners can use this endpoint to view all permissions for a
* fine-tuned model checkpoint.
*
* @example
* ```ts
* const permission =
* await client.fineTuning.checkpoints.permissions.retrieve(
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',
* );
* ```
*/
retrieve(fineTunedModelCheckpoint: string, query?: PermissionRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<PermissionRetrieveResponse>;
/**
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
*
* Organization owners can use this endpoint to delete a permission for a
* fine-tuned model checkpoint.
*
* @example
* ```ts
* const permission =
* await client.fineTuning.checkpoints.permissions.delete(
* 'cp_zc4Q7MP6XxulcVzj4MZdwsAB',
* {
* fine_tuned_model_checkpoint:
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',
* },
* );
* ```
*/
delete(permissionID: string, params: PermissionDeleteParams, options?: RequestOptions): APIPromise<PermissionDeleteResponse>;
}
export type PermissionCreateResponsesPage = Page<PermissionCreateResponse>;
/**
* The `checkpoint.permission` object represents a permission for a fine-tuned
* model checkpoint.
*/
export interface PermissionCreateResponse {
/**
* The permission identifier, which can be referenced in the API endpoints.
*/
id: string;
/**
* The Unix timestamp (in seconds) for when the permission was created.
*/
created_at: number;
/**
* The object type, which is always "checkpoint.permission".
*/
object: 'checkpoint.permission';
/**
* The project identifier that the permission is for.
*/
project_id: string;
}
export interface PermissionRetrieveResponse {
data: Array<PermissionRetrieveResponse.Data>;
has_more: boolean;
object: 'list';
first_id?: string | null;
last_id?: string | null;
}
export declare namespace PermissionRetrieveResponse {
/**
* The `checkpoint.permission` object represents a permission for a fine-tuned
* model checkpoint.
*/
interface Data {
/**
* The permission identifier, which can be referenced in the API endpoints.
*/
id: string;
/**
* The Unix timestamp (in seconds) for when the permission was created.
*/
created_at: number;
/**
* The object type, which is always "checkpoint.permission".
*/
object: 'checkpoint.permission';
/**
* The project identifier that the permission is for.
*/
project_id: string;
}
}
export interface PermissionDeleteResponse {
/**
* The ID of the fine-tuned model checkpoint permission that was deleted.
*/
id: string;
/**
* Whether the fine-tuned model checkpoint permission was successfully deleted.
*/
deleted: boolean;
/**
* The object type, which is always "checkpoint.permission".
*/
object: 'checkpoint.permission';
}
export interface PermissionCreateParams {
/**
* The project identifiers to grant access to.
*/
project_ids: Array<string>;
}
export interface PermissionRetrieveParams {
/**
* Identifier for the last permission ID from the previous pagination request.
*/
after?: string;
/**
* Number of permissions to retrieve.
*/
limit?: number;
/**
* The order in which to retrieve permissions.
*/
order?: 'ascending' | 'descending';
/**
* The ID of the project to get permissions for.
*/
project_id?: string;
}
export interface PermissionDeleteParams {
/**
* The ID of the fine-tuned model checkpoint to delete a permission for.
*/
fine_tuned_model_checkpoint: string;
}
export declare namespace Permissions {
export { type PermissionCreateResponse as PermissionCreateResponse, type PermissionRetrieveResponse as PermissionRetrieveResponse, type PermissionDeleteResponse as PermissionDeleteResponse, type PermissionCreateResponsesPage as PermissionCreateResponsesPage, type PermissionCreateParams as PermissionCreateParams, type PermissionRetrieveParams as PermissionRetrieveParams, type PermissionDeleteParams as PermissionDeleteParams, };
}
//# sourceMappingURL=permissions.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"permissions.d.mts","sourceRoot":"","sources":["../../../src/resources/fine-tuning/checkpoints/permissions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,WAAW,EAAE;OACrB,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,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UAAU,EAAE,MAAM,CAAC;KACpB;CACF;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,uBAAuB,CAAC;CACjC;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,2BAA2B,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}

View File

@@ -0,0 +1,160 @@
import { APIResource } from "../../../core/resource.js";
import { APIPromise } from "../../../core/api-promise.js";
import { Page, PagePromise } from "../../../core/pagination.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class Permissions extends APIResource {
/**
* **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
*
* This enables organization owners to share fine-tuned models with other projects
* in their organization.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const permissionCreateResponse of client.fineTuning.checkpoints.permissions.create(
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',
* { project_ids: ['string'] },
* )) {
* // ...
* }
* ```
*/
create(fineTunedModelCheckpoint: string, body: PermissionCreateParams, options?: RequestOptions): PagePromise<PermissionCreateResponsesPage, PermissionCreateResponse>;
/**
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
*
* Organization owners can use this endpoint to view all permissions for a
* fine-tuned model checkpoint.
*
* @example
* ```ts
* const permission =
* await client.fineTuning.checkpoints.permissions.retrieve(
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',
* );
* ```
*/
retrieve(fineTunedModelCheckpoint: string, query?: PermissionRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<PermissionRetrieveResponse>;
/**
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
*
* Organization owners can use this endpoint to delete a permission for a
* fine-tuned model checkpoint.
*
* @example
* ```ts
* const permission =
* await client.fineTuning.checkpoints.permissions.delete(
* 'cp_zc4Q7MP6XxulcVzj4MZdwsAB',
* {
* fine_tuned_model_checkpoint:
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',
* },
* );
* ```
*/
delete(permissionID: string, params: PermissionDeleteParams, options?: RequestOptions): APIPromise<PermissionDeleteResponse>;
}
export type PermissionCreateResponsesPage = Page<PermissionCreateResponse>;
/**
* The `checkpoint.permission` object represents a permission for a fine-tuned
* model checkpoint.
*/
export interface PermissionCreateResponse {
/**
* The permission identifier, which can be referenced in the API endpoints.
*/
id: string;
/**
* The Unix timestamp (in seconds) for when the permission was created.
*/
created_at: number;
/**
* The object type, which is always "checkpoint.permission".
*/
object: 'checkpoint.permission';
/**
* The project identifier that the permission is for.
*/
project_id: string;
}
export interface PermissionRetrieveResponse {
data: Array<PermissionRetrieveResponse.Data>;
has_more: boolean;
object: 'list';
first_id?: string | null;
last_id?: string | null;
}
export declare namespace PermissionRetrieveResponse {
/**
* The `checkpoint.permission` object represents a permission for a fine-tuned
* model checkpoint.
*/
interface Data {
/**
* The permission identifier, which can be referenced in the API endpoints.
*/
id: string;
/**
* The Unix timestamp (in seconds) for when the permission was created.
*/
created_at: number;
/**
* The object type, which is always "checkpoint.permission".
*/
object: 'checkpoint.permission';
/**
* The project identifier that the permission is for.
*/
project_id: string;
}
}
export interface PermissionDeleteResponse {
/**
* The ID of the fine-tuned model checkpoint permission that was deleted.
*/
id: string;
/**
* Whether the fine-tuned model checkpoint permission was successfully deleted.
*/
deleted: boolean;
/**
* The object type, which is always "checkpoint.permission".
*/
object: 'checkpoint.permission';
}
export interface PermissionCreateParams {
/**
* The project identifiers to grant access to.
*/
project_ids: Array<string>;
}
export interface PermissionRetrieveParams {
/**
* Identifier for the last permission ID from the previous pagination request.
*/
after?: string;
/**
* Number of permissions to retrieve.
*/
limit?: number;
/**
* The order in which to retrieve permissions.
*/
order?: 'ascending' | 'descending';
/**
* The ID of the project to get permissions for.
*/
project_id?: string;
}
export interface PermissionDeleteParams {
/**
* The ID of the fine-tuned model checkpoint to delete a permission for.
*/
fine_tuned_model_checkpoint: string;
}
export declare namespace Permissions {
export { type PermissionCreateResponse as PermissionCreateResponse, type PermissionRetrieveResponse as PermissionRetrieveResponse, type PermissionDeleteResponse as PermissionDeleteResponse, type PermissionCreateResponsesPage as PermissionCreateResponsesPage, type PermissionCreateParams as PermissionCreateParams, type PermissionRetrieveParams as PermissionRetrieveParams, type PermissionDeleteParams as PermissionDeleteParams, };
}
//# sourceMappingURL=permissions.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../../src/resources/fine-tuning/checkpoints/permissions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,WAAW,EAAE;OACrB,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,wBAAwB,EAAE,MAAM,EAChC,I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MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,uBAAuB,CAAC;CACjC;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,2BAA2B,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}

View File

@@ -0,0 +1,73 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Permissions = void 0;
const resource_1 = require("../../../core/resource.js");
const pagination_1 = require("../../../core/pagination.js");
const path_1 = require("../../../internal/utils/path.js");
class Permissions extends resource_1.APIResource {
/**
* **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
*
* This enables organization owners to share fine-tuned models with other projects
* in their organization.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const permissionCreateResponse of client.fineTuning.checkpoints.permissions.create(
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',
* { project_ids: ['string'] },
* )) {
* // ...
* }
* ```
*/
create(fineTunedModelCheckpoint, body, options) {
return this._client.getAPIList((0, path_1.path) `/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, (pagination_1.Page), { body, method: 'post', ...options });
}
/**
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
*
* Organization owners can use this endpoint to view all permissions for a
* fine-tuned model checkpoint.
*
* @example
* ```ts
* const permission =
* await client.fineTuning.checkpoints.permissions.retrieve(
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',
* );
* ```
*/
retrieve(fineTunedModelCheckpoint, query = {}, options) {
return this._client.get((0, path_1.path) `/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, {
query,
...options,
});
}
/**
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
*
* Organization owners can use this endpoint to delete a permission for a
* fine-tuned model checkpoint.
*
* @example
* ```ts
* const permission =
* await client.fineTuning.checkpoints.permissions.delete(
* 'cp_zc4Q7MP6XxulcVzj4MZdwsAB',
* {
* fine_tuned_model_checkpoint:
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',
* },
* );
* ```
*/
delete(permissionID, params, options) {
const { fine_tuned_model_checkpoint } = params;
return this._client.delete((0, path_1.path) `/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, options);
}
}
exports.Permissions = Permissions;
//# sourceMappingURL=permissions.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../../src/resources/fine-tuning/checkpoints/permissions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,4DAA6D;AAE7D,0DAAoD;AAEpD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,wBAAgC,EAChC,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,4BAA4B,wBAAwB,cAAc,EACtE,CAAA,iBAA8B,CAAA,EAC9B,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CACrC,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,QAAQ,CACN,wBAAgC,EAChC,QAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,4BAA4B,wBAAwB,cAAc,EAAE;YAC9F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,YAAoB,EACpB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,2BAA2B,EAAE,GAAG,MAAM,CAAC;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CACxB,IAAA,WAAI,EAAA,4BAA4B,2BAA2B,gBAAgB,YAAY,EAAE,EACzF,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AApFD,kCAoFC"}

View File

@@ -0,0 +1,69 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import { Page } from "../../../core/pagination.mjs";
import { path } from "../../../internal/utils/path.mjs";
export class Permissions extends APIResource {
/**
* **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
*
* This enables organization owners to share fine-tuned models with other projects
* in their organization.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const permissionCreateResponse of client.fineTuning.checkpoints.permissions.create(
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',
* { project_ids: ['string'] },
* )) {
* // ...
* }
* ```
*/
create(fineTunedModelCheckpoint, body, options) {
return this._client.getAPIList(path `/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, (Page), { body, method: 'post', ...options });
}
/**
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
*
* Organization owners can use this endpoint to view all permissions for a
* fine-tuned model checkpoint.
*
* @example
* ```ts
* const permission =
* await client.fineTuning.checkpoints.permissions.retrieve(
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',
* );
* ```
*/
retrieve(fineTunedModelCheckpoint, query = {}, options) {
return this._client.get(path `/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, {
query,
...options,
});
}
/**
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
*
* Organization owners can use this endpoint to delete a permission for a
* fine-tuned model checkpoint.
*
* @example
* ```ts
* const permission =
* await client.fineTuning.checkpoints.permissions.delete(
* 'cp_zc4Q7MP6XxulcVzj4MZdwsAB',
* {
* fine_tuned_model_checkpoint:
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',
* },
* );
* ```
*/
delete(permissionID, params, options) {
const { fine_tuned_model_checkpoint } = params;
return this._client.delete(path `/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, options);
}
}
//# sourceMappingURL=permissions.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"permissions.mjs","sourceRoot":"","sources":["../../../src/resources/fine-tuning/checkpoints/permissions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,IAAI,EAAe;OAErB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,wBAAgC,EAChC,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,4BAA4B,wBAAwB,cAAc,EACtE,CAAA,IAA8B,CAAA,EAC9B,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CACrC,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,QAAQ,CACN,wBAAgC,EAChC,QAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,4BAA4B,wBAAwB,cAAc,EAAE;YAC9F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,YAAoB,EACpB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,2BAA2B,EAAE,GAAG,MAAM,CAAC;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CACxB,IAAI,CAAA,4BAA4B,2BAA2B,gBAAgB,YAAY,EAAE,EACzF,OAAO,CACR,CAAC;IACJ,CAAC;CACF"}