Class OpenAIClient
Represents the OpenAI service with methods to interact with the API.
Inherited Members
ApiClient<OpenAIClient, Api, OpenAISettings>.STREAMAsync<TBody, TDelta, TResult>(ICrudService, string, TBody, RequestOptions, IStreamPipeline<string, TDelta, TResult>, params RequestParameter[])
ApiClient<OpenAIClient, Api, OpenAISettings>.STREAMAsync<TBody, TDelta, TResult>(ICrudService, string, TBody, RequestOptions, IStreamPipeline<PooledBytes, TDelta, TResult>, params RequestParameter[])
Assembly: Glitch9.AIDevKit.Provider.OpenAI.dll
Syntax
public sealed class OpenAIClient : AIClient<OpenAIClient, OpenAISettings>, IApiClient
Constructors
|
Edit this page
View Source
OpenAIClient()
Declaration
Properties
|
Edit this page
View Source
Audio
Learn how to turn audio into text or text into audio.
Declaration
public AudioService Audio { get; }
Property Value
|
Edit this page
View Source
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
|
Edit this page
View Source
Beta
Beta features that are not yet available in the main API.
Declaration
public BetaService Beta { get; }
Property Value
|
Edit this page
View Source
Chat
Given a list of messages comprising a conversation, the model will return a response.
Declaration
public ChatService Chat { get; }
Property Value
|
Edit this page
View Source
Conversations
Declaration
public ConversationService Conversations { get; }
Property Value
|
Edit this page
View Source
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
|
Edit this page
View Source
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
|
Edit this page
View Source
FineTuning
Manage fine-tuning jobs to tailor a model to your specific training data.
Declaration
public FineTuningService FineTuning { get; }
Property Value
|
Edit this page
View Source
Images
Given a prompt and/or an input image, the model will generate a new image.
Declaration
public ImageService Images { get; }
Property Value
|
Edit this page
View Source
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
|
Edit this page
View Source
Moderations
Given some input text, outputs if the model classifies it as potentially harmful across several categories.
Declaration
public ModerationService Moderations { get; }
Property Value
|
Edit this page
View Source
Responses
Declaration
public ResponseService Responses { get; }
Property Value
|
Edit this page
View Source
Videos
Declaration
public VideoService Videos { get; }
Property Value
|
Edit this page
View Source
Voices
Declaration
public VoiceService Voices { get; }
Property Value
Methods
|
Edit this page
View Source
Override this to add more headers as needed.
Declaration
protected override List<HttpHeader> CreateAdditionalHeaders()
Returns
Overrides
|
Edit this page
View Source
CreateBaseRequestParameters()
Creates the request parameters for API key, version, and beta version.
Declaration
protected override Dictionary<string, RequestParameter> CreateBaseRequestParameters()
Returns
Overrides
|
Edit this page
View Source
CreateJsonConverters()
Override this to add more JsonConverters.
Declaration
protected override List<JsonConverter> CreateJsonConverters()
Returns
| Type |
Description |
| List<JsonConverter> |
|
Overrides
|
Edit this page
View Source
ResolveApiKey(string)
Declaration
public override string ResolveApiKey(string serviceName = null)
Parameters
| Type |
Name |
Description |
| string |
serviceName |
|
Returns
Overrides
|
Edit this page
View Source
ResolveBetaVersion(string)
Declaration
public override string ResolveBetaVersion(string arg)
Parameters
| Type |
Name |
Description |
| string |
arg |
|
Returns
Overrides
Implements
Extension Methods