models.d.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import { APIResource } from "../core/resource.js";
  2. import { APIPromise } from "../core/api-promise.js";
  3. import { Page, PagePromise } from "../core/pagination.js";
  4. import { RequestOptions } from "../internal/request-options.js";
  5. export declare 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: string, options?: RequestOptions): APIPromise<Model>;
  11. /**
  12. * Lists the currently available models, and provides basic information about each
  13. * one such as the owner and availability.
  14. */
  15. list(options?: RequestOptions): PagePromise<ModelsPage, Model>;
  16. /**
  17. * Delete a fine-tuned model. You must have the Owner role in your organization to
  18. * delete a model.
  19. */
  20. delete(model: string, options?: RequestOptions): APIPromise<ModelDeleted>;
  21. }
  22. export type ModelsPage = Page<Model>;
  23. /**
  24. * Describes an OpenAI model offering that can be used with the API.
  25. */
  26. export interface Model {
  27. /**
  28. * The model identifier, which can be referenced in the API endpoints.
  29. */
  30. id: string;
  31. /**
  32. * The Unix timestamp (in seconds) when the model was created.
  33. */
  34. created: number;
  35. /**
  36. * The object type, which is always "model".
  37. */
  38. object: 'model';
  39. /**
  40. * The organization that owns the model.
  41. */
  42. owned_by: string;
  43. }
  44. export interface ModelDeleted {
  45. id: string;
  46. deleted: boolean;
  47. object: string;
  48. }
  49. export declare namespace Models {
  50. export { type Model as Model, type ModelDeleted as ModelDeleted, type ModelsPage as ModelsPage };
  51. }
  52. //# sourceMappingURL=models.d.ts.map