Theia API Documentation v1.71.0
    Preparing search index...

    Hierarchy

    • OpenAI
      • MistralFixedOpenAI
    Index

    Constructors

    • API Client for interfacing with the OpenAI API.

      Parameters

      • Optional__namedParameters: ClientOptions

      Returns MistralFixedOpenAI

    Properties

    _options: ClientOptions
    apiKey: string
    audio: Audio
    baseURL: string
    batches: Batches

    Create large batches of API requests to run asynchronously.

    beta: Beta
    chat: Chat
    completions: Completions

    Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position.

    containers: Containers
    conversations: Conversations

    Manage conversations and conversation items.

    embeddings: Embeddings

    Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.

    evals: Evals

    Manage and run evals in the OpenAI platform.

    fetchOptions: undefined | MergedRequestInit
    files: Files

    Files are used to upload documents that can be used with features like Assistants and Fine-tuning.

    fineTuning: FineTuning
    graders: Graders
    idempotencyHeader?: string
    images: Images

    Given a prompt and/or an input image, the model will generate a new image.

    logger: Logger
    logLevel: undefined | LogLevel
    maxRetries: number
    models: Models

    List and describe the various models available in the API.

    moderations: Moderations

    Given text and/or image inputs, classifies if those inputs are potentially harmful.

    organization: null | string
    project: null | string
    realtime: Realtime
    responses: Responses
    skills: Skills
    timeout: number
    uploads: Uploads

    Use Uploads to upload large files in multiple parts.

    vectorStores: VectorStores
    videos: Videos
    webhooks: Webhooks
    webhookSecret: null | string
    APIConnectionError: typeof APIConnectionError
    APIConnectionTimeoutError: typeof APIConnectionTimeoutError
    APIError: typeof APIError
    APIUserAbortError: typeof APIUserAbortError
    AuthenticationError: typeof AuthenticationError
    BadRequestError: typeof BadRequestError
    ConflictError: typeof ConflictError
    DEFAULT_TIMEOUT: number
    InternalServerError: typeof InternalServerError
    InvalidWebhookSignatureError: typeof InvalidWebhookSignatureError
    NotFoundError: typeof NotFoundError
    OpenAI: typeof OpenAI
    OpenAIError: typeof OpenAIError
    PermissionDeniedError: typeof PermissionDeniedError
    RateLimitError: typeof RateLimitError
    toFile: (
        value: ToFileInput | PromiseLike<ToFileInput>,
        name?: null | string,
        options?: FilePropertyBag,
    ) => Promise<File>

    Type Declaration

      • (
            value: ToFileInput | PromiseLike<ToFileInput>,
            name?: null | string,
            options?: FilePropertyBag,
        ): Promise<File>
      • Helper for creating a File to pass to an SDK upload method from a variety of different data formats

        Parameters

        • value: ToFileInput | PromiseLike<ToFileInput>

          the raw content of the file. Can be an Uploadable, BlobLikePart, or AsyncIterable of BlobLikeParts

        • Optionalname: null | string

          the name of the file. If omitted, toFile will try to determine a file name from bits if possible

        • Optionaloptions: FilePropertyBag

          additional properties

          • type

            the MIME type of the content

          • lastModified

            the last modified timestamp

        Returns Promise<File>

        a File with the given properties

    UnprocessableEntityError: typeof UnprocessableEntityError

    Methods

    • Returns Promise<boolean>

    • Parameters

      • opts: FinalRequestOptions

      Returns Promise<undefined | NullableHeaders>

    • Parameters

      • inputOptions: FinalRequestOptions
      • Optional__namedParameters: { retryCount?: number }

      Returns Promise<{ req: FinalizedRequestInit; timeout: number; url: string }>

    • Parameters

      • path: string
      • query: undefined | null | Record<string, unknown>
      • OptionaldefaultBaseURL: string

      Returns string

    • Returns string

    • Returns undefined | Record<string, undefined | string>

    • Type Parameters

      • Rsp

      Parameters

      • path: string
      • Optionalopts: PromiseOrValue<RequestOptions>

      Returns APIPromise<Rsp>

    • Parameters

      • url: _RequestInfo
      • init: undefined | RequestInit
      • ms: number
      • controller: AbortController

      Returns Promise<Response>

    • Type Parameters

      • Rsp

      Parameters

      • path: string
      • Optionalopts: PromiseOrValue<RequestOptions>

      Returns APIPromise<Rsp>

    • Type Parameters

      • Item
      • PageClass extends AbstractPage<Item> = AbstractPage<Item>

      Parameters

      • path: string
      • Page: new (...args: any[]) => PageClass
      • Optionalopts: PromiseOrValue<RequestOptions>

      Returns PagePromise<PageClass, Item>

    • Parameters

      • status: number
      • error: Object
      • message: undefined | string
      • headers: Headers

      Returns APIError

    • Type Parameters

      • Rsp

      Parameters

      • path: string
      • Optionalopts: PromiseOrValue<RequestOptions>

      Returns APIPromise<Rsp>

    post

    • post<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>

      Type Parameters

      • Rsp

      Parameters

      • path: string
      • Optionalopts: PromiseOrValue<RequestOptions>

      Returns APIPromise<Rsp>

    • Used as a callback for mutating the given FinalRequestOptions object.

      Parameters

      • options: FinalRequestOptions

      Returns Promise<void>

    • Used as a callback for mutating the given RequestInit object.

      This is useful for cases where you want to add certain headers based off of the request properties, e.g. method or url.

      Parameters

      • request: RequestInit
      • __namedParameters: { options: FinalRequestOptions; url: string }

      Returns Promise<void>

    • Type Parameters

      • Rsp

      Parameters

      • path: string
      • Optionalopts: PromiseOrValue<RequestOptions>

      Returns APIPromise<Rsp>

    • Type Parameters

      • Rsp

      Parameters

      • options: PromiseOrValue<FinalRequestOptions>
      • OptionalremainingRetries: null | number

      Returns APIPromise<Rsp>

    • Type Parameters

      • Item = unknown
      • PageClass extends AbstractPage<Item> = AbstractPage<Item>

      Parameters

      • Page: new (
            ...args: [
                client: OpenAI,
                response: Response,
                body: unknown,
                options: FinalRequestOptions,
            ],
        ) => PageClass
      • options: PromiseOrValue<FinalRequestOptions>

      Returns PagePromise<PageClass, Item>

    • Parameters

      • query: object | Record<string, unknown>

      Returns string

    • Parameters

      • __namedParameters: NullableHeaders

      Returns void

    • Create a new client instance re-using the same options given to the current client with optional overriding.

      Parameters

      • options: Partial<ClientOptions>

      Returns this