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

Add base_url override support, to allow changing the OpenAI endpoint. #21

Merged
merged 1 commit into from
May 16, 2024

Conversation

joshuataylor
Copy link
Contributor

The OpenAI Python library allows overriding the base_url when defining the client.

It would be great if we could do this on a config level, where api_url in ExOpenAI.Config could be defined in config like this:

config :ex_openai,
  base_url: System.get_env("OPENAI_BASE_URL"),

Then it would override the base_url.

Let me know what you think of this, happy for any changes, it's a pretty basic change, so do what you think is best :).

@eadz
Copy link

eadz commented Mar 3, 2024

+1 for this. There are a lots of openapi compatible services out there.

@dvcrn
Copy link
Owner

dvcrn commented Mar 24, 2024

Interesting, I didn't know such a use case exists. Thanks for the PR! lGTM

@Tonyhaenn
Copy link

Any ETA on merging this PR?

@dvcrn
Copy link
Owner

dvcrn commented May 16, 2024

Slipped through the cracks, whoops!

@dvcrn dvcrn merged commit db4e95b into dvcrn:main May 16, 2024
1 check passed
@Tonyhaenn
Copy link

Woot! Thanks for the speedy turnaround.

Big thanks to @joshuataylor for the original PR

@dvcrn
Copy link
Owner

dvcrn commented May 16, 2024

I want to cut a new release after changes (if any) required for the new gpt-4o model, will try to get around it soon-ish

@Tonyhaenn
Copy link

Thank you! I read that GPT4o right now is only supporting text input / output for now. The new AV input/output would be rolled out in the coming months.

I'm building an app that's going to use both Gpt4 and llama3, so eager to see this go live :)

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.

None yet

4 participants