-
Notifications
You must be signed in to change notification settings - Fork 1.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
feat(sandbox): add sandbox support in pai.chat and df.chat #1595
Conversation
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.
❌ Changes requested. Reviewed everything up to 818eadd in 1 minute and 45 seconds
More details
- Looked at
222
lines of code in5
files - Skipped
0
files when reviewing. - Skipped posting
6
drafted comments based on config settings.
1. pandasai/dataframe/base.py:104
- Draft comment:
Typo in docstring: change 'securily' to 'securely'. - Reason this comment was not posted:
Marked as duplicate.
2. pandasai/__init__.py:167
- Draft comment:
Typo in docstring: 'securily' should be 'securely'. - Reason this comment was not posted:
Marked as duplicate.
3. pandasai/__init__.py:31
- Draft comment:
Duplicate import of 'Column' from semantic_layer_schema detected; please remove the redundant import. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. pandasai/dataframe/base.py:104
- Draft comment:
Typo in docstring: 'securily' should be 'securely'. - Reason this comment was not posted:
Marked as duplicate.
5. pandasai/__init__.py:141
- Draft comment:
Consider using a logging framework instead of print statements for better production practices. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. pandasai/dataframe/base.py:187
- Draft comment:
Consider replacing print statements with proper logging for production use. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_Gc5ADzEaHCJC8Wb2
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
pandasai/__init__.py
Outdated
""" | ||
Start a new chat interaction with the assistant on Dataframe(s). | ||
|
||
Args: | ||
query (str): The query to run against the dataframes. | ||
*dataframes: Variable number of dataframes to query. | ||
sandbox (Sandbox, optional): The sandbox to execute code securily. |
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.
Typo in docstring: change 'securily' to 'securely'.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1595 +/- ##
=======================================
Coverage 89.41% 89.42%
=======================================
Files 72 72
Lines 2579 2581 +2
=======================================
+ Hits 2306 2308 +2
Misses 273 273
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Approved once the minor typos are fixed!!
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.
👍 Looks good to me! Incremental review on 71ac630 in 37 seconds
More details
- Looked at
38
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. pandasai/dataframe/base.py:104
- Draft comment:
Corrected typo in docstring ('securily' -> 'securely'). - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is purely informative, as it only mentions a typo correction in a docstring. It doesn't provide any actionable feedback or suggestions for improvement.
2. tests/unit_tests/test_pandasai_init.py:61
- Draft comment:
Fixed function name typo ('sanbox' to 'sandbox'). - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is purely informative, as it only states that a typo was fixed. It does not provide any actionable feedback or suggestions for improvement.
3. pandasai/dataframe/base.py:23
- Draft comment:
Good improvement: Importing Sandbox outside the TYPE_CHECKING block ensures it's available at runtime for the chat method. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is purely informative and does not provide any actionable feedback or suggestions for improvement. It simply acknowledges a change without offering any constructive criticism or guidance.
4. pandasai/dataframe/base.py:104
- Draft comment:
Fixed a typo in the docstring: 'securily' is now 'securely'. - Reason this comment was not posted:
Marked as duplicate.
5. tests/unit_tests/test_pandasai_init.py:61
- Draft comment:
Renamed test function from 'test_chat_sanbox_passed_to_agent' to 'test_chat_sandbox_passed_to_agent' to fix the typo. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_iGYnSu8lgxvJEHUR
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Add sandbox support to
pai.chat
anddf.chat
for secure code execution, with updated documentation and tests.sandbox
parameter tochat()
inpandasai/__init__.py
andpandasai/dataframe/base.py
for secure code execution.README.md
with Docker sandbox usage instructions.test_dataframe.py
andtest_pandasai_init.py
to verifysandbox
parameter handling inchat()
.Agent
is called withsandbox
in tests.This description was created by
for 71ac630. It will automatically update as commits are pushed.