Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to specify openAI baseURL #141

Merged
merged 1 commit into from
Dec 13, 2023
Merged

Conversation

MrStashley
Copy link

@MrStashley MrStashley commented Dec 13, 2023

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

Screen Shot 2023-12-12 at 5 15 13 PM

--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.

@CLAassistant
Copy link

CLAassistant commented Dec 13, 2023

CLA assistant check
All committers have signed the CLA.

@sawka
Copy link
Member

sawka commented Dec 13, 2023

this looks great!

@MrStashley MrStashley closed this Dec 13, 2023
@MrStashley MrStashley reopened this Dec 13, 2023
@MrStashley MrStashley force-pushed the MrStashley-133-specify-base-url branch from 111929c to 9c1146f Compare December 13, 2023 21:42
@sawka sawka merged commit 535fd0d into main Dec 13, 2023
4 checks passed
@MrStashley MrStashley deleted the MrStashley-133-specify-base-url branch February 15, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants