Class OpenAIBaseEndpoint
- Namespace
- OpenAI
- Assembly
- OpenAI-DotNet.dll
public abstract class OpenAIBaseEndpoint- Inheritance
- 
      
      OpenAIBaseEndpoint
- Derived
- Inherited Members
Constructors
OpenAIBaseEndpoint(OpenAIClient)
protected OpenAIBaseEndpoint(OpenAIClient client)Parameters
- clientOpenAIClient
Fields
client
protected readonly OpenAIClient clientField Value
Properties
EnableDebug
Enables or disables the logging of all http responses of header and body information for this endpoint.
WARNING! Enabling this in your production build, could potentially leak sensitive information!
public bool EnableDebug { get; set; }Property Value
IsAzureDeployment
Indicates if the endpoint has an Azure Deployment.
protected virtual bool? IsAzureDeployment { get; }Property Value
- bool?
Remarks
If the endpoint is an Azure deployment, is true. If it is not an Azure deployment, is false. If it is not an Azure supported Endpoint, is null.
Root
The root endpoint address.
protected abstract string Root { get; }Property Value
Methods
DeleteAsync(string, CancellationToken)
protected Task<HttpResponseMessage> DeleteAsync(string uri, CancellationToken cancellationToken)Parameters
- uristring
- cancellationTokenCancellationToken
Returns
GetAsync(string, CancellationToken)
protected Task<HttpResponseMessage> GetAsync(string uri, CancellationToken cancellationToken)Parameters
- uristring
- cancellationTokenCancellationToken
Returns
GetStreamAsync(string, CancellationToken)
protected Task<Stream> GetStreamAsync(string uri, CancellationToken cancellationToken)Parameters
- uristring
- cancellationTokenCancellationToken
Returns
GetUrl(string, Dictionary<string, string>)
Gets the full formatted url for the API endpoint.
protected string GetUrl(string endpoint = "", Dictionary<string, string> queryParameters = null)Parameters
- endpointstring
- The endpoint url. 
- queryParametersDictionary<string, string>
- Optional, parameters to add to the endpoint. 
Returns
GetWebsocketUri(string, Dictionary<string, string>)
protected string GetWebsocketUri(string endpoint = "", Dictionary<string, string> queryParameters = null)Parameters
- endpointstring
- queryParametersDictionary<string, string>
Returns
PatchAsync(string, HttpContent, CancellationToken)
protected Task<HttpResponseMessage> PatchAsync(string uri, HttpContent content, CancellationToken cancellationToken)Parameters
- uristring
- contentHttpContent
- cancellationTokenCancellationToken
Returns
PostAsync(string, HttpContent, CancellationToken)
protected Task<HttpResponseMessage> PostAsync(string uri, HttpContent content, CancellationToken cancellationToken)Parameters
- uristring
- contentHttpContent
- cancellationTokenCancellationToken