diff --git a/OpenAI-DotNet/Authentication/OpenAIClientSettings.cs b/OpenAI-DotNet/Authentication/OpenAIClientSettings.cs index da1a0fcb..18c08740 100644 --- a/OpenAI-DotNet/Authentication/OpenAIClientSettings.cs +++ b/OpenAI-DotNet/Authentication/OpenAIClientSettings.cs @@ -28,6 +28,21 @@ public OpenAIClientSettings() UseOAuthAuthentication = true; } + /// + /// Creates a new instance of for use with OpenAI. + /// Must specify a full base url such as "https://api.openai.com/v1/". + /// + /// A custom base url. + public OpenAIClientSettings(string baseUrl) + { + ResourceName = string.Empty; + ApiVersion = string.Empty; + DeploymentId = string.Empty; + BaseRequest = string.Empty; + BaseRequestUrlFormat = $"{baseUrl}{{0}}"; + UseOAuthAuthentication = true; + } + /// /// Creates a new instance of for use with OpenAI. ///