OpenAI
OpenAI copied to clipboard
Support for different URL scheme, port.
The host
that you supply to OpenAI.Configuration
is converted into a URL by buildURL
, which has the scheme hard-coded to https
.
With projects like GPT4All allowing users to run a local server that provides an OpenAI-style API to a local engine, it would be useful to be able to either override the scheme and port, or supply the first part of the URL entirely ("http://localhost:4891").
The OpenAI SDK lets you specify this as 'basePath':
configuration.basePath = "https://api.openai.com/v1";