models.mjs 1.0 KB

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