Class OpenAI
Represents the OpenAI service with methods to interact with the API.
Inheritance
object
RESTClient
OpenAI
Inherited Members
CRUDClient<OpenAI>.Name
CRUDClient<OpenAI>.Version
CRUDClient<OpenAI>.BetaVersion
CRUDClient<OpenAI>.OnException
CRUDClient<OpenAI>.CRUDLogger
CRUDClient<OpenAI>.BaseUrl
CRUDClient<OpenAI>.GetApiKey()
CRUDClient<OpenAI>.HandleException(Exception)
Assembly: .dll
Syntax
public class OpenAI : AIClient<OpenAI>
Constructors
OpenAI()
Declaration
Fields
Declaration
public static RESTHeader AssistantsApiHeader
Field Value
Type |
Description |
RESTHeader |
|
Declaration
public static RESTHeader RealtimeApiHeader
Field Value
Type |
Description |
RESTHeader |
|
Properties
Audio
Learn how to turn audio into text or text into audio.
Declaration
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.
Declaration
public BatchService Batch { get; }
Property Value
Beta
Beta features that are not yet available in the main API.
Declaration
public BetaService Beta { get; }
Property Value
Chat
Given a list of messages comprising a conversation, the model will return a response.
Declaration
public ChatService Chat { get; }
Property Value
DefaultInstance
The default instance of the OpenAI client.
Declaration
public static OpenAI DefaultInstance { get; }
Property Value
Embeddings
Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
Declaration
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.
Declaration
public FileService Files { get; }
Property Value
FineTuning
Manage fine-tuning jobs to tailor a model to your specific training data.
Declaration
public FineTuningService FineTuning { get; }
Property Value
Images
Given a prompt and/or an input image, the model will generate a new image.
Declaration
public ImageService Images { get; }
Property Value
LogOpenAIStreamEvents
Gets or sets a value indicating whether OpenAI stream events should be logged.
Declaration
public bool LogOpenAIStreamEvents { get; set; }
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.
Declaration
public ModelService Models { get; }
Property Value
Moderations
Given some input text, outputs if the model classifies it as potentially harmful across several categories.
Declaration
public ModerationService Moderations { get; }
Property Value
Methods
IsDeletedPredicate(RESTResponse)
Override this method to handle the status of a Glitch9.IO.Networking.RESTApi.CRUDMethod.Delete operation.
Declaration
protected override bool IsDeletedPredicate(RESTResponse res)
Parameters
Type |
Name |
Description |
RESTResponse |
res |
|
Returns
Overrides