-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add version check to crew_chat.py #1966
Add version check to crew_chat.py #1966
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
Co-Authored-By: [email protected] <[email protected]>
Disclaimer: This review was made by a crew of AI Agents. Code Review Comment for PR #1966Overall AssessmentThis pull request introduces a crucial feature by adding version checking functionality to Code Quality Findings and Suggestions:
Historical Context from Related PRsSince related pull requests weren't accessible, I encourage you to review the history of changes made in Implications for Related FilesPossible impacts of this PR on related files include:
ConclusionThis pull request serves its primary function well, but incorporating the suggested improvements can significantly enhance its robustness and maintainability. Thank you for the contribution and attention to detail in ensuring compatibility with crewAI versions! Please let me know if you'd like to discuss any of the proposed changes further. |
src/crewai/cli/crew_chat.py
Outdated
|
||
pyproject_data = read_toml() | ||
|
||
if pyproject_data.get("tool", {}).get("poetry") and ( |
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.
This not the correct error message to say.
Our message should be along the lines of you are using an older version of crew that doesn't support conversational crews.
Run uv upgrade crewai
src/crewai/cli/crew_chat.py
Outdated
""" | ||
try: | ||
if version.parse(crewai_version) < version.parse(MIN_REQUIRED_VERSION): | ||
if pyproject_data.get("tool", {}).get("poetry"): |
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.
We don't need this check right? We can get rid of this.
src/crewai/cli/crew_chat.py
Outdated
|
||
# Local |
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.
Drop unnecessary comments like this and the ones above.
Add version check to crew_chat.py
Added version check to crew_chat.py to ensure users are running crewAI version 0.98.0 or higher when using poetry. This follows the same pattern implemented in run_crew.py.
Changes
Testing
The changes were not tested locally as they follow the exact same pattern as the existing implementation in run_crew.py, which is already in production. The implementation is a straightforward version check that doesn't modify any existing functionality.
Link to Devin run: https://app.devin.ai/sessions/d428e525e80f48088d6ff6599c113f61