diff --git a/Runtime/OpenAIApi.cs b/Runtime/OpenAIApi.cs index 2c4b0f6..5c2f439 100644 --- a/Runtime/OpenAIApi.cs +++ b/Runtime/OpenAIApi.cs @@ -36,14 +36,18 @@ private Configuration Configuration } /// OpenAI API base path for requests. - private const string BASE_PATH = "https://api.openai.com/v1"; + private string BASE_PATH = "https://api.openai.com/v1"; - public OpenAIApi(string apiKey = null, string organization = null) + public OpenAIApi(string apiKey = null, string organization = null, string customPath = null) { if (apiKey != null) { configuration = new Configuration(apiKey, organization); } + if(customPath != null) + { + BASE_PATH = customPath; + } } /// Used for serializing and deserializing PascalCase request object fields into snake_case format for JSON. Ignores null fields when creating JSON strings.