Skip to content

Allow custom openai baseurl #1

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ezynda3
Copy link

@ezynda3 ezynda3 commented Feb 23, 2025

Describe the change
This PR introduces a new method NewOpenAILLMWithBaseURL that allows initializing the OpenAI LLM client with a custom base URL. This change enables more flexibility in configuring the OpenAI client, particularly for users who need to connect to different OpenAI-compatible endpoints or proxy servers.

Describe your solution
The solution adds a new constructor function NewOpenAILLMWithBaseURL that takes both an API key and a base URL as parameters. It uses OpenAI's configuration system to set up the client with a custom base URL while maintaining the existing functionality of the standard NewOpenAILLM constructor.

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.

1 participant