models.mjs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
  2. import { APIResource } from "../resource.mjs";
  3. import { Page } from "../pagination.mjs";
  4. export class Models extends APIResource {
  5. /**
  6. * Retrieves a model instance, providing basic information about the model such as
  7. * the owner and permissioning.
  8. */
  9. retrieve(model, options) {
  10. return this._client.get(`/models/${model}`, options);
  11. }
  12. /**
  13. * Lists the currently available models, and provides basic information about each
  14. * one such as the owner and availability.
  15. */
  16. list(options) {
  17. return this._client.getAPIList('/models', ModelsPage, options);
  18. }
  19. /**
  20. * Delete a fine-tuned model. You must have the Owner role in your organization to
  21. * delete a model.
  22. */
  23. del(model, options) {
  24. return this._client.delete(`/models/${model}`, options);
  25. }
  26. }
  27. /**
  28. * Note: no pagination actually occurs yet, this is for forwards-compatibility.
  29. */
  30. export class ModelsPage extends Page {
  31. }
  32. Models.ModelsPage = ModelsPage;
  33. //# sourceMappingURL=models.mjs.map