OpenAI-API-dotnet
OpenAI-API-dotnet copied to clipboard
Can I set the base url to a different one rather than the one from openai
Can I use this library to call api from a different url? This is because in some countries openai api can’t be accessed, some sort of wrapper api could be used instead, like this one : https://openai.api2d.net/
Could anybody please take a look at this issue? this function is critical to my project. many thanks!!! @OkGoDoIt @esp0 @dex3r @gotmike
This might work if the wrapper API follows similar endpoint names (eg. "chat/completions").
var api = new OpenAI_API.OpenAIAPI();
api.ApiUrlFormat = " https://openai.api2d.net/{0}/{1}";
the first arg in the URI format is the version and the second is the endpoint name.