models.d.ts 1.7 KB

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