-
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
Safety check implemented incorrectly #1444
Comments
Hey @rhiever! I'm here to help you with bug fixes, answer your questions, and guide you on becoming a contributor. Let's squash those bugs together! 🤖 The issue you're encountering is due to the safety check in the To address this, you might consider refining the safety check to be more context-aware. For example, you could implement a more sophisticated parsing mechanism that distinguishes between safe and unsafe uses of these keywords, or adjust the logic to only flag these keywords when they appear in specific contexts that are more likely to indicate a security risk. |
i just got the same problem : |
I also met the same problem. How did you solve it? Hope to hear your suggestions @rhiever @ilyasch199 |
Did this get solved? How did this get solved?! This is ridiculous since Pandas AI creates the column 'Daily Consumption' and then tells me it's a security risk. What are the work arounds? |
Yes, I have solved this problem. My suggestion is to modify these constraints from the source code |
How would I how to modify it? Can you provide an example? here is my code Initialize OpenAI
|
System Info
OS version: Latest MacOS
Python version: 3.9
The current version of pandasai being used: 2.4.0
🐛 Describe the bug
The current safety check seems to be checking if any of these strings are in any of the generated code: "io", "os", "subprocess", "sys", "importlib"
So it's firing off on a matplotlib plt.title command with the word "Distribution" in it, for example.
Please fix!
The text was updated successfully, but these errors were encountered: