Class OpenAISettings
- Namespace
- OpenAI
- Assembly
- OpenAI-DotNet.dll
The client settings for configuring Azure OpenAI or custom domain.
public sealed class OpenAISettings
- Inheritance
-
OpenAISettings
- Inherited Members
Constructors
OpenAISettings()
Creates a new instance of OpenAISettings for use with OpenAI.
public OpenAISettings()
OpenAISettings(string, string)
Creates a new instance of OpenAISettings for use with OpenAI.
public OpenAISettings(string domain, string apiVersion = "v1")
Parameters
OpenAISettings(string, string, string, bool, string)
Creates a new instance of the OpenAISettings for use with Azure OpenAI.
https://learn.microsoft.com/en-us/azure/cognitive-services/openai/
public OpenAISettings(string resourceName, string deploymentId, string apiVersion = "2024-10-21", bool useActiveDirectoryAuthentication = false, string azureDomain = "openai.azure.com")
Parameters
resourceName
stringThe name of your Azure OpenAI Resource.
deploymentId
stringThe name of your model deployment. You're required to first deploy a model before you can make calls.
apiVersion
stringOptional, defaults to 2024-10-21.
useActiveDirectoryAuthentication
boolOptional, set to true if you want to use Azure Active Directory for Authentication.
azureDomain
stringOptional, defaults to "openai.azure.com".
Properties
ApiVersion
public string ApiVersion { get; }
Property Value
BaseRequest
public string BaseRequest { get; }
Property Value
Default
public static OpenAISettings Default { get; }
Property Value
DeploymentId
public string DeploymentId { get; }
Property Value
IsAzureOpenAI
public bool IsAzureOpenAI { get; }
Property Value
ResourceName
public string ResourceName { get; }