Skip to content

Fix Python 3.9 compatibility issues in from_provider function #1554

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

Closed

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Fix Python 3.9 compatibility issues in from_provider function

This PR addresses the CI failures in the implementation of issue #1542 by:

  1. Reverting the type annotation syntax from X | Y to Union[X, Y] for Python 3.9 compatibility
  2. Updating the GenerativeModel initialization to use genai.configure(api_key=...) when an API key is provided

Changes

  • Reverted type annotations to use Union[X, Y] instead of X | Y syntax
  • Updated the GenerativeModel initialization in the generative-ai provider section
  • Ensured all overloaded function signatures have the same parameters

Fixes #1542

Link to Devin run: https://app.devin.ai/sessions/2b32f7dbd32042a09271c1348e76c086
Requested by: Jason Liu (work@jxnl.co)

devin-ai-integration bot and others added 4 commits May 22, 2025 23:07
Co-Authored-By: Jason Liu <jason@jxnl.co>
… errors

Co-Authored-By: Jason Liu <jason@jxnl.co>
… Optional

Co-Authored-By: Jason Liu <jason@jxnl.co>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions github-actions bot added bug Something isn't working enhancement New feature or request python Pull requests that update python code size:M This PR changes 30-99 lines, ignoring generated files. labels May 22, 2025
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
instructor b863c50 Visit preview May 22 2025, 11:51 PM

Copy link
Contributor Author

Closing due to inactivity for more than 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request python Pull requests that update python code size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accept api_key in from_provider
0 participants