Table of Contents

Class CreateBatchRequest

Namespace
OpenAI.Batch
Assembly
OpenAI-DotNet.dll
public sealed class CreateBatchRequest
Inheritance
CreateBatchRequest
Inherited Members

Constructors

CreateBatchRequest(string, string, IReadOnlyDictionary<string, object>, string, BatchOutputFolder)

public CreateBatchRequest(string inputFileId, string endpoint, IReadOnlyDictionary<string, object> metadata = null, string inputBlob = null, BatchOutputFolder outputFolder = null)

Parameters

inputFileId string

The ID of an uploaded file that contains requests for the new batch. Your input file must be formatted as a JSONL file, and must be uploaded with the purpose batch. The file can contain up to 50,000 requests, and can be up to 100 MB in size.

endpoint string

The endpoint to be used for all requests in the batch. Currently, '/v1/chat/completions', '/v1/embeddings', and '/v1/completions' are supported. Note that '/v1/embeddings' batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.

metadata IReadOnlyDictionary<string, object>

Optional custom metadata for the batch.

inputBlob string

Azure blob

outputFolder BatchOutputFolder

BatchOutputFolder.

Properties

CompletionWindow

[JsonPropertyName("completion_window")]
public string CompletionWindow { get; }

Property Value

string

Endpoint

[JsonPropertyName("endpoint")]
public string Endpoint { get; }

Property Value

string

InputBlob

[JsonPropertyName("input_blob")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string InputBlob { get; }

Property Value

string

InputFileId

[JsonPropertyName("input_file_id")]
public string InputFileId { get; }

Property Value

string

Metadata

[JsonPropertyName("metadata")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IReadOnlyDictionary<string, object> Metadata { get; }

Property Value

IReadOnlyDictionary<string, object>

OutputFolder

[JsonPropertyName("output_folder")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public BatchOutputFolder OutputFolder { get; }

Property Value

BatchOutputFolder