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

Hope expose the base_url by setting the OPENAI_API_BASE environment variable or setBaseURL #26

Open
zsz00 opened this issue Aug 6, 2023 · 1 comment

Comments

@zsz00
Copy link

zsz00 commented Aug 6, 2023

@ThatcherC

base_url is not necessarily https://openai.com

@zsz00
Copy link
Author

zsz00 commented Nov 19, 2023

using OpenAI
provider = OpenAI.OpenAIProvider(
api_key=ENV["OPENAI_API_KEY"],
base_url=ENV["OPENAI_BASE_URL_OVERRIDE"]
)
response = create_chat(
provider,
"gpt-3.5-turbo",
[Dict("role" => "user", "content" => "Write some ancient Greek poetry")]
)

like this

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

No branches or pull requests

1 participant