-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtryAGI.OpenAI.Models.CreateBatchRequest.g.cs
More file actions
95 lines (86 loc) · 5.37 KB
/
tryAGI.OpenAI.Models.CreateBatchRequest.g.cs
File metadata and controls
95 lines (86 loc) · 5.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#nullable enable
namespace tryAGI.OpenAI
{
/// <summary>
///
/// </summary>
public sealed partial class CreateBatchRequest
{
/// <summary>
/// The ID of an uploaded file that contains requests for the new batch.<br/>
/// See [upload file](/docs/api-reference/files/create) for how to upload a file.<br/>
/// Your input file must be formatted as a [JSONL file](/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("input_file_id")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string InputFileId { get; set; }
/// <summary>
/// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`, `/v1/images/generations`, `/v1/images/edits`, and `/v1/videos` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("endpoint")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateBatchRequestEndpointJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::tryAGI.OpenAI.CreateBatchRequestEndpoint Endpoint { get; set; }
/// <summary>
/// The time frame within which the batch should be processed. Currently only `24h` is supported.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("completion_window")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateBatchRequestCompletionWindowJsonConverter))]
public global::tryAGI.OpenAI.CreateBatchRequestCompletionWindow CompletionWindow { get; set; }
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")]
public global::System.Collections.Generic.Dictionary<string, string>? Metadata { get; set; }
/// <summary>
/// The expiration policy for the output and/or error file that are generated for a batch.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("output_expires_after")]
public global::tryAGI.OpenAI.BatchFileExpirationAfter? OutputExpiresAfter { get; set; }
/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
/// <summary>
/// Initializes a new instance of the <see cref="CreateBatchRequest" /> class.
/// </summary>
/// <param name="inputFileId">
/// The ID of an uploaded file that contains requests for the new batch.<br/>
/// See [upload file](/docs/api-reference/files/create) for how to upload a file.<br/>
/// Your input file must be formatted as a [JSONL file](/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.
/// </param>
/// <param name="endpoint">
/// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`, `/v1/images/generations`, `/v1/images/edits`, and `/v1/videos` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.
/// </param>
/// <param name="completionWindow">
/// The time frame within which the batch should be processed. Currently only `24h` is supported.
/// </param>
/// <param name="metadata"></param>
/// <param name="outputExpiresAfter">
/// The expiration policy for the output and/or error file that are generated for a batch.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public CreateBatchRequest(
string inputFileId,
global::tryAGI.OpenAI.CreateBatchRequestEndpoint endpoint,
global::tryAGI.OpenAI.CreateBatchRequestCompletionWindow completionWindow,
global::System.Collections.Generic.Dictionary<string, string>? metadata,
global::tryAGI.OpenAI.BatchFileExpirationAfter? outputExpiresAfter)
{
this.InputFileId = inputFileId ?? throw new global::System.ArgumentNullException(nameof(inputFileId));
this.Endpoint = endpoint;
this.CompletionWindow = completionWindow;
this.Metadata = metadata;
this.OutputExpiresAfter = outputExpiresAfter;
}
/// <summary>
/// Initializes a new instance of the <see cref="CreateBatchRequest" /> class.
/// </summary>
public CreateBatchRequest()
{
}
}
}