Hierarchy

  • APIResource
    • Files

Constructors

Properties

_client: openai.OpenAI

Methods

  • Returns the contents of the specified file.

    Parameters

    Returns APIPromise<Response>

  • Upload a file that can be used across various endpoints. The size of all the files uploaded by one organization can be up to 100 GB.

    The size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants. See the Assistants Tools guide to learn more about the types of files supported. The Fine-tuning API only supports .jsonl files.

    Please contact us if you need to increase these storage limits.

    Parameters

    Returns APIPromise<FileObject>

  • Delete a file.

    Parameters

    Returns APIPromise<FileDeleted>

  • Returns information about a specific file.

    Parameters

    Returns APIPromise<FileObject>

  • Returns the contents of the specified file.

    Parameters

    Returns APIPromise<string>

    Deprecated

    The .content() method should be used instead

  • Waits for the given file to be processed, default timeout is 30 mins.

    Parameters

    • id: string
    • Optional __namedParameters: {
          maxWait?: number;
          pollInterval?: number;
      }
      • Optional maxWait?: number
      • Optional pollInterval?: number

    Returns Promise<FileObject>

Generated using TypeDoc