Class for handling chat completion requests.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

Methods

  • Create Chat Completions.

    Generate a chat completion based on the provided messages and parameters using the provided model.

    Type Parameters

    • S extends undefined | boolean = false
    • R extends undefined | boolean = undefined

    Parameters

    Returns Promise<ChatCompletionResult<S, R>>

    Either a Response of ChatsResponse or a Stream.

    Throws

    If validation fails or an error occurs during the request.