Table of Contents

Class BatchExtensions

Namespace
OpenAI.Batch
Assembly
OpenAI-DotNet.dll
public static class BatchExtensions
Inheritance
BatchExtensions
Inherited Members

Methods

UpdateAsync(BatchResponse, CancellationToken)

Get the latest status of the BatchResponse.

public static Task<BatchResponse> UpdateAsync(this BatchResponse batchResponse, CancellationToken cancellationToken = default)

Parameters

batchResponse BatchResponse

BatchResponse.

cancellationToken CancellationToken

Optional, CancellationToken.

Returns

Task<BatchResponse>

BatchResponse.

WaitForStatusChangeAsync(BatchResponse, int?, int?, CancellationToken)

Waits for Status to change.

public static Task<BatchResponse> WaitForStatusChangeAsync(this BatchResponse batchResponse, int? pollingInterval = null, int? timeout = null, CancellationToken cancellationToken = default)

Parameters

batchResponse BatchResponse

BatchResponse.

pollingInterval int?

Optional, time in milliseconds to wait before polling status.

timeout int?

Optional, timeout in seconds to cancel polling.
Defaults to 30 seconds.
Set to -1 for indefinite.

cancellationToken CancellationToken

Optional, CancellationToken.

Returns

Task<BatchResponse>

BatchResponse.