Hierarchy

  • APIResource
    • Completions

Constructors

Properties

Methods

Constructors

Properties

_client: openai.OpenAI

Methods

  • Type Parameters

    • FunctionsArgs extends BaseFunctionsArgs

    Parameters

    Returns ChatCompletionRunner

    Deprecated

    • use runTools instead.
  • Type Parameters

    • FunctionsArgs extends BaseFunctionsArgs

    Parameters

    Returns ChatCompletionStreamingRunner

  • A convenience helper for using tool calls with the /chat/completions endpoint which automatically calls the JavaScript functions you provide and sends their results back to the /chat/completions endpoint, looping as long as the model requests function calls.

    For more details and examples, see the docs

    Type Parameters

    • FunctionsArgs extends BaseFunctionsArgs

    Parameters

    Returns ChatCompletionRunner

  • Type Parameters

    • FunctionsArgs extends BaseFunctionsArgs

    Parameters

    Returns ChatCompletionStreamingRunner

  • Creates a chat completion stream

    Parameters

    • body: ChatCompletionStreamParams
    • Optional options: RequestOptions<unknown>

    Returns ChatCompletionStream

Generated using TypeDoc