models.js 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. "use strict";
  2. // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
  3. Object.defineProperty(exports, "__esModule", { value: true });
  4. exports.Models = void 0;
  5. const resource_1 = require("../core/resource.js");
  6. const pagination_1 = require("../core/pagination.js");
  7. const path_1 = require("../internal/utils/path.js");
  8. class Models extends resource_1.APIResource {
  9. /**
  10. * Retrieves a model instance, providing basic information about the model such as
  11. * the owner and permissioning.
  12. */
  13. retrieve(model, options) {
  14. return this._client.get((0, path_1.path) `/models/${model}`, options);
  15. }
  16. /**
  17. * Lists the currently available models, and provides basic information about each
  18. * one such as the owner and availability.
  19. */
  20. list(options) {
  21. return this._client.getAPIList('/models', (pagination_1.Page), options);
  22. }
  23. /**
  24. * Delete a fine-tuned model. You must have the Owner role in your organization to
  25. * delete a model.
  26. */
  27. delete(model, options) {
  28. return this._client.delete((0, path_1.path) `/models/${model}`, options);
  29. }
  30. }
  31. exports.Models = Models;
  32. //# sourceMappingURL=models.js.map