Skip to content

feat: Add user defined openai model provider (#124) #125

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

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

MiaoDX
Copy link
Contributor

@MiaoDX MiaoDX commented Apr 7, 2025

Change-Id: Ice3c42381021e474d751528a0b5c4726998a6acb

Hi,

I am using other OpenAI model providers, with custom base_url and model. So, it should be nice to be configurable and won't hurt others.

And, inside llm_api.py and web_scraper.py, change to use python3 directly, to be consistent with other tools.

Change-Id: Ice3c42381021e474d751528a0b5c4726998a6acb
Signed-off-by: MiaoDX <[email protected]>
@Copilot Copilot AI review requested due to automatic review settings April 7, 2025 12:18
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • .env.example: Language not supported
Comments suppressed due to low confidence (2)

tools/llm_api.py:71

  • Consider validating or normalizing the base_url to ensure it adheres to the expected URL format. This can help avoid runtime issues with misconfigured endpoints.
base_url = os.getenv('OPENAI_BASE_URL', "https://api.openai.com/v1")

tools/llm_api.py:145

  • Review the default model fallback to ensure 'gpt-4o' matches the expected model identifier for the provider. Confirm that this behavior is aligned with the overall configuration strategy.
model = os.getenv('OPENAI_MODEL_DEPLOYMENT', 'gpt-4o')

@grapeot grapeot merged commit 3086d03 into grapeot:master Apr 9, 2025
1 check passed
@grapeot
Copy link
Owner

grapeot commented Apr 9, 2025

Thanks for the PR!

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.

2 participants