Hierarchy

  • APIResource
    • Responses

Constructors

Properties

inputItems: InputItems

Methods

  • Cancels a model response with the given ID. Only responses created with the background parameter set to true can be cancelled. Learn more.

    Parameters

    • responseID: string
    • Optionaloptions: RequestOptions

    Returns APIPromise<OpenAIClient.Responses.Response>

    const response = await client.responses.cancel(
    'resp_677efb5139a88190b512bc3fef8e535d',
    );
  • Deletes a model response with the given ID.

    Parameters

    • responseID: string
    • Optionaloptions: RequestOptions

    Returns APIPromise<void>

    await client.responses.delete(
    'resp_677efb5139a88190b512bc3fef8e535d',
    );
  • Type Parameters

    • Params extends ResponseCreateParamsWithTools
    • ParsedT = ExtractParsedContentFromParams<Params>

    Parameters

    • body: Params
    • Optionaloptions: RequestOptions

    Returns APIPromise<ParsedResponse<ParsedT>>

  • Creates a model response stream

    Type Parameters

    • Params extends ResponseStreamParams
    • ParsedT = ExtractParsedContentFromParams<Params>

    Parameters

    • body: Params
    • Optionaloptions: RequestOptions

    Returns ResponseStream<ParsedT>