openai/openai-dotnet

Public

mirrored from https://github.com/openai/openai-dotnetAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
achandmsft-patch-2

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/Generated/BatchClient.cs

41lines · modecode

1// <auto-generated/>
2
3#nullable disable
4
5using System;
6using System.ClientModel;
7using System.ClientModel.Primitives;
8using System.Diagnostics.CodeAnalysis;
9using System.Threading.Tasks;
10using OpenAI;
11
12namespace OpenAI.Batch
13{
14 [Experimental("OPENAI001")]
15 public partial class BatchClient
16 {
17 private readonly Uri _endpoint;
18
19 protected BatchClient()
20 {
21 }
22
23 public ClientPipeline Pipeline { get; }
24
25 public virtual ClientResult GetBatch(string batchId, RequestOptions options)
26 {
27 Argument.AssertNotNullOrEmpty(batchId, nameof(batchId));
28
29 using PipelineMessage message = CreateGetBatchRequest(batchId, options);
30 return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options));
31 }
32
33 public virtual async Task<ClientResult> GetBatchAsync(string batchId, RequestOptions options)
34 {
35 Argument.AssertNotNullOrEmpty(batchId, nameof(batchId));
36
37 using PipelineMessage message = CreateGetBatchRequest(batchId, options);
38 return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
39 }
40 }
41}