Conversation
- Introduced a dummy class for SecretStr to handle cases where Pydantic is not available, ensuring compatibility in minimal contexts. - Added a utility function to display API key values more securely, improving the visibility of sensitive information during testing. - Updated test cases to ensure the OPENAI_API_KEY is available for subprocess commands, enhancing the reliability of tests that require real API interactions. These changes aim to improve the robustness of API key handling and enhance the testing framework's functionality.
…ling - Upgraded PraisonAI version from 2.2.17 to 2.2.18 across multiple Dockerfiles and configuration files for improved functionality. - Enhanced GitHub Actions workflow by exporting additional environment variables related to the OpenAI API, improving integration and debugging capabilities. These changes aim to ensure better performance and reliability in the workflow and API interactions.
|
Caution Review failedThe pull request is closed. WalkthroughThis update increases the PraisonAI package version from 2.2.17 to 2.2.18 across all Dockerfiles, documentation, and deployment scripts. It also upgrades dependencies in agent-related configuration files and enhances test scripts with environment propagation and real test markers. CI workflow scripts improve API key handling and debugging output. Changes
Sequence Diagram(s)sequenceDiagram
participant CI as GitHub Actions Workflow
participant Script as Inline Python Script
participant Env as Environment Variables
participant PraisonAI as PraisonAIModel
CI->>Script: Run debug script
Script->>Env: Retrieve OPENAI_API_KEY
Script->>Script: Use get_key_display_value to display key safely
Script->>PraisonAI: Create LLM instance with API key
PraisonAI-->>Script: Return instance or raise exception
Script->>Script: Display LLM instance API key (truncated)
Script-->>CI: Print debug output
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (14)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
✅ Deploy Preview for praisonai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Hello @MervinPraison, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
As gemini-code-assist, I've reviewed this pull request titled "2.2.18". Based on the changes, this PR appears to be a version bump release, updating the project to version 2.2.18. The core changes involve updating version numbers across various configuration and documentation files, as well as performing significant dependency updates, particularly reflected in the lock files.
Highlights
- Version Bump: The main
PraisonAIpackage version has been updated from2.2.17to2.2.18. - Agent Package Version: The
praisonaiagentspackage version has been updated from0.0.90to0.0.91. - Dependency Updates: Several dependencies have been updated, including a major version bump for
chromadb(from0.5.23to1.0.11) andmarkitdown(from0.0.1a3to0.1.2). New dependencies likeazure-ai-documentintelligence,azure-identity,isodate,magika,msal,msal-extensions,olefile,pyjwt,xlrd, andyoutube-transcript-api(with a version bump) have been added, whilechroma-hnswlib,pathvalidate, andpuremagichave been removed. - Configuration and Documentation Alignment: Dockerfiles, documentation code snippets, and the Homebrew formula have been updated to reference the new
PraisonAIversion (2.2.18) and align with the updated dependencies. - Test File Adjustments: Test files have been slightly modified to import
pytest, add@pytest.mark.realmarkers to several tests (indicating they might require a real environment or API key), and quote command arguments in CLI tests.
Changelog
Click here to see the changelog
- docker/Dockerfile
- Updated
praisonaidependency version to2.2.18.
- Updated
- docker/Dockerfile.chat
- Updated
praisonaidependency version to2.2.18.
- Updated
- docker/Dockerfile.dev
- Updated
praisonaidependency version to2.2.18.
- Updated
- docker/Dockerfile.ui
- Updated
praisonaidependency version to2.2.18.
- Updated
- docs/api/praisonai/deploy.html
- Updated
praisonaiversion in the Dockerfile code snippet within the documentation to2.2.18.
- Updated
- docs/developers/local-development.mdx
- Updated
praisonaiversion in the Dockerfile code snippet within the documentation to2.2.18.
- Updated
- docs/ui/chat.mdx
- Updated
praisonaiversion in the Dockerfile code snippet within the documentation to2.2.18.
- Updated
- docs/ui/code.mdx
- Updated
praisonaiversion in the Dockerfile code snippet within the documentation to2.2.18.
- Updated
- src/praisonai-agents/pyproject.toml
- Updated
praisonaiagentspackage version to0.0.91. - Updated
chromadbdependency constraint formemoryandknowledgeextras to>=1.0.0. - Updated
markitdown[all]dependency constraint forknowledgeextra to>=0.1.0.
- Updated
- src/praisonai-agents/uv.lock
- Updated locked version of
chromadbto1.0.11. - Updated locked version of
fastapito0.115.9. - Updated locked version of
exceptiongroupdependency marker. - Updated locked version of
markitdownto0.1.2and adjusted its dependencies. - Updated locked version of
youtube-transcript-apito1.0.3. - Added locked dependencies for
azure-ai-documentintelligence,azure-core,azure-identity,isodate,magika,msal,msal-extensions,olefile,pyjwt, andxlrd. - Removed locked dependencies for
chroma-hnswlib,pathvalidate, andpuremagic.
- Updated locked version of
- src/praisonai/praisonai.rb
- Updated Homebrew formula URL and SHA256 hash to reference the
v2.2.18tag.
- Updated Homebrew formula URL and SHA256 hash to reference the
- src/praisonai/praisonai/deploy.py
- Updated the hardcoded
praisonaiversion string used in the generated Dockerfile to2.2.18.
- Updated the hardcoded
- src/praisonai/pyproject.toml
- Updated
PraisonAIpackage version to2.2.18. - Updated
praisonaiagentsdependency constraint to>=0.0.91. - Updated
markitdowndependency forall,knowledgeextras to include[all]and constraint>=0.1.0.
- Updated
- src/praisonai/tests/test.py
- Imported
pytest. - Added
@pytest.mark.realdecorator to several test methods (test_main_with_agents_advanced,test_main_with_autogen_framework,test_main_with_custom_framework,test_main_with_internet_search_tool,test_main_with_built_in_tool,test_auto_example). - Updated CLI command strings to wrap the prompt in double quotes.
- Imported
- src/praisonai/uv.lock
- Updated locked version of
praisonaito2.2.18. - Updated locked version of
praisonaiagentsto0.0.91.
- Updated locked version of
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Version bumps arrive,
Dependencies take a dive,
Lock file reflects change.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request primarily handles the version bump to 2.2.18 for PraisonAI and praisonaiagents, along with updating various dependencies. The consistency across Dockerfiles, documentation, and configuration files is good. The improvements in src/praisonai/tests/test.py, such as adding pytest.mark.real for test categorization and enhancing CLI test robustness (quoting arguments, environment variable handling), are positive contributions.
However, there are a couple of points regarding dependency management and packaging practices that would be good to address.
Summary of Findings
- Major Dependency Update (chromadb): The
chromadbdependency was upgraded from v0.5.x to v1.0.x. This major version change requires careful testing to ensure no breaking changes affectpraisonaiagents. - Homebrew Formula SHA256 Calculation: The Homebrew formula (
praisonai.rb) uses a dynamic SHA256 calculation for the release tarball. For security and integrity, a static, pre-calculated SHA256 hash is recommended for tagged releases. - Test Enhancements: Improvements in
test.py(usingpytest.mark.real, better CLI argument handling) are positive and enhance test suite robustness. This was not commented on directly as it's a positive change. - Dependency Version Consistency: Version numbers for
praisonaiand its sub-packages/dependencies have been consistently updated across various configuration files and documentation. This was not commented on directly as it's a positive aspect of the PR.
Merge Readiness
This pull request makes necessary version updates and includes some good test enhancements. However, before merging, I recommend addressing the points raised regarding the chromadb major version update (ensuring thorough testing and compatibility) and the dynamic SHA256 calculation in the Homebrew formula. Addressing these will improve the stability and security of the release. As a reviewer, I am not authorized to approve pull requests; please ensure these changes are reviewed and approved by other maintainers before merging.
|
|
||
| memory = [ | ||
| "chromadb>=0.5.23" | ||
| "chromadb>=1.0.0" |
There was a problem hiding this comment.
The chromadb dependency has been updated from version 0.5.x to >=1.0.0 (locked to 1.0.11 in uv.lock). This is a major version upgrade, which can often introduce breaking changes or require migration steps.
Could you clarify if the implications of this major version bump have been thoroughly tested within praisonaiagents? Highlighting any specific testing performed or referencing upstream migration guides for chromadb 1.0 would be beneficial to ensure compatibility and prevent potential regressions.
| url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.17.tar.gz" | ||
| sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.17.tar.gz | shasum -a 256`.split.first | ||
| url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.18.tar.gz" | ||
| sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.18.tar.gz | shasum -a 256`.split.first |
There was a problem hiding this comment.
The SHA256 hash for the release tarball is currently calculated dynamically at runtime using curl and shasum. For Homebrew formulas, especially those tracking tagged releases, it's a crucial best practice for security and integrity to use a static, pre-calculated SHA256 hash. This ensures that Homebrew users always install the exact, verified version of the software corresponding to the tag.
Using a dynamic hash could lead to issues if the tag were ever re-pointed or the tarball content changed unexpectedly. Could this be updated to a static hash for version 2.2.18?
To get the static hash, you can download the tarball and run shasum -a 256 v2.2.18.tar.gz locally.
sha256 "YOUR_PRECALCULATED_SHA256_FOR_V2.2.18_HERE" # Replace with the actual hash
Summary by CodeRabbit