Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/note.picotech.app/public_html/node_modules/openai/resources/beta/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Assistants = void 0;
const resource_1 = require("../../core/resource.js");
const pagination_1 = require("../../core/pagination.js");
const headers_1 = require("../../internal/headers.js");
const path_1 = require("../../internal/utils/path.js");
class Assistants extends resource_1.APIResource {
/**
* Create an assistant with a model and instructions.
*
* @example
* ```ts
* const assistant = await client.beta.assistants.create({
* model: 'gpt-4o',
* });
* ```
*/
create(body, options) {
return this._client.post('/assistants', {
body,
...options,
headers: (0, headers_1.buildHeaders)([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
});
}
/**
* Retrieves an assistant.
*
* @example
* ```ts
* const assistant = await client.beta.assistants.retrieve(
* 'assistant_id',
* );
* ```
*/
retrieve(assistantID, options) {
return this._client.get((0, path_1.path) `/assistants/${assistantID}`, {
...options,
headers: (0, headers_1.buildHeaders)([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
});
}
/**
* Modifies an assistant.
*
* @example
* ```ts
* const assistant = await client.beta.assistants.update(
* 'assistant_id',
* );
* ```
*/
update(assistantID, body, options) {
return this._client.post((0, path_1.path) `/assistants/${assistantID}`, {
body,
...options,
headers: (0, headers_1.buildHeaders)([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
});
}
/**
* Returns a list of assistants.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const assistant of client.beta.assistants.list()) {
* // ...
* }
* ```
*/
list(query = {}, options) {
return this._client.getAPIList('/assistants', (pagination_1.CursorPage), {
query,
...options,
headers: (0, headers_1.buildHeaders)([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
});
}
/**
* Delete an assistant.
*
* @example
* ```ts
* const assistantDeleted =
* await client.beta.assistants.delete('assistant_id');
* ```
*/
delete(assistantID, options) {
return this._client.delete((0, path_1.path) `/assistants/${assistantID}`, {
...options,
headers: (0, headers_1.buildHeaders)([{ 'OpenAI-Beta': 'assistants=v2' }, options?.headers]),
});
}
}
exports.Assistants = Assistants;
//# sourceMappingURL=assistants.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0037 ]-- |