Allow user to specify openAI baseURL #141
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR for #133
Exposes open ai BaseURL in client:set command
User can set BaseURL with
/client:set openaibaseurl=<BASEURL>
--TESTING--
I couldn't find any other hosted open ai models to test this with, but I was able to confirm with logs that the baseURL is correctly plumbed through the client data opts and it appears correctly when used by the chat command. I was also able to set the base url to the default open ai base url and verify that the chat command still worked, as well as verify that the chat command stopped working when given a bogus base url
--CONSIDERATIONS--
Something to consider about this pr: The go openai library that we use has a special Azure type. if azure baseUrl is specified, and APITypeAzure is not specified, client.fullURL is not going to work correctly. This shouldn't be a big deal, we don't currently use client.fullURL(), but it's something to note if we need it in the future.
Also authenticating with Azure API Keys is currently not supported, must authenticate with Microsoft Entra authentication, which works exactly the same as Open AI token authentication.