Class OpenAIClient
Represents the OpenAI service with methods to interact with the API.
public class OpenAIClient : AIClient<OpenAIClient, OpenAISettings>
- Inheritance
-
objectOpenAIClient
- Inherited Members
Constructors
OpenAIClient()
public OpenAIClient()
Fields
RealtimeBetaHeader
public static RESTHeader RealtimeBetaHeader
Field Value
- RESTHeader
Properties
Audio
Learn how to turn audio into text or text into audio.
public AudioService Audio { get; }
Property Value
Batch
Create large batches of API requests for asynchronous processing. The Batch API returns completions within 24 hours for a 50% discount.
public BatchService Batch { get; }
Property Value
Beta
Beta features that are not yet available in the main API.
public BetaService Beta { get; }
Property Value
Chat
Given a list of messages comprising a conversation, the model will return a response.
public ChatService Chat { get; }
Property Value
Conversations
public ConversationService Conversations { get; }
Property Value
Embeddings
Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
public EmbeddingService Embeddings { get; }
Property Value
Files
Files are used to upload documents that can be used with features like Assistants, Fine-tuning, and Batch API.
public FileService Files { get; }
Property Value
FineTuning
Manage fine-tuning jobs to tailor a model to your specific training data.
public FineTuningService FineTuning { get; }
Property Value
Images
Given a prompt and/or an input image, the model will generate a new image.
public ImageService Images { get; }
Property Value
Models
List and describe the various models available in the API. You can refer to the Models documentation to understand what models are available and the differences between them.
public ModelService Models { get; }
Property Value
Moderations
Given some input text, outputs if the model classifies it as potentially harmful across several categories.
public ModerationService Moderations { get; }
Property Value
Responses
public ResponseService Responses { get; }
Property Value
Videos
public VideoService Videos { get; }
Property Value
Methods
CreateApiClientSettings()
protected override CloudApiClientSettings CreateApiClientSettings()
Returns
- CloudApiClientSettings
CreateJsonConverters()
protected override List<JsonConverter> CreateJsonConverters()
Returns
- List<JsonConverter>
GetApiKey(string)
public override string GetApiKey(string serviceName = null)
Parameters
serviceNamestring
Returns
- string
GetBetaVersion(string)
public override string GetBetaVersion(string arg)
Parameters
argstring
Returns
- string