-
Notifications
You must be signed in to change notification settings - Fork 28
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
bugfix: openai models not discoverable #64
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request introduces a new dependency by adding the Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
setup.cfg (1)
69-69
: Consider this a temporary fix and monitor for updates.While this fixes the immediate issue, pinning to an older version of httpx might need to be revisited when:
- OpenAI client releases updates that resolve the compatibility issue
- Security updates become available for httpx
Consider:
- Adding a comment explaining why this specific version is required
- Creating an issue to track the need to upgrade httpx when possible
- Setting up dependency scanning to alert on security updates
# needed because lxml has spun out this code out of its main repo: lxml_html_clean - httpx==0.27.2 + # Pinned to 0.27.2 to fix TypeError with OpenAI client (see PR #64) + httpx==0.27.2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
setup.cfg
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: macos-latest py3.11
- GitHub Check: macos-latest py3.10
- GitHub Check: macos-latest py3.9
- GitHub Check: windows-latest py3.11
- GitHub Check: windows-latest py3.10
- GitHub Check: windows-latest py3.9
- GitHub Check: ubuntu-latest py3.11
- GitHub Check: ubuntu-latest py3.10
- GitHub Check: ubuntu-latest py3.9
🔇 Additional comments (1)
setup.cfg (1)
69-69
: Verify httpx version compatibility and security implications.While pinning httpx to 0.27.2 resolves the TypeError with OpenAI client, we should verify this version's compatibility and security status.
Let's check the compatibility and security implications:
✅ Verification successful
✓ httpx 0.27.2 is compatible and secure
The pinned version satisfies OpenAI's requirements (>=0.23.0,<1) and has no known security vulnerabilities.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check latest versions and security advisories for httpx # Get latest httpx version from PyPI echo "Latest httpx version:" curl -s https://pypi.org/pypi/httpx/json | jq -r '.info.version' # Check if openai has specific httpx requirements echo -e "\nOpenAI package requirements:" curl -s https://pypi.org/pypi/openai/1.42.0/json | jq -r '.info.requires_dist[]' | grep -i httpx # Check for security advisories echo -e "\nSecurity advisories for httpx:" gh api graphql -f query=' { securityVulnerabilities(first: 5, ecosystem: PIP, package: "httpx") { nodes { advisory { summary severity publishedAt } vulnerableVersionRange firstPatchedVersion { identifier } } } }'Length of output: 931
Hi @royerloic ,
a student of mine reported that openai models are not discoverable by napari-chatgpt, with an error message in the terminal. I found the error online, tested the proposed solution of downgrading httpx to 0.27.2 and it worked. Hence, you find this solution here as PR.
closes #62
Best,
Robert
Full error message:
Summary by CodeRabbit
httpx
library version 0.27.2 as a project dependency