-
Notifications
You must be signed in to change notification settings - Fork 5k
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
chore: add better docs for safe_mode; load semgrep if available #709
chore: add better docs for safe_mode; load semgrep if available #709
Conversation
Install Open Interpreter with the safety toolkit dependencies as part of the bundle: | ||
|
||
```shell | ||
pip install open-interpreter[safe] |
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 can leverage the tool.poetry.extras
configuration to allow folks to optionally install semgrep
and other safety tools via the [safe]
extra.
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.
YES. I love this idea.
I think it would be great to make a slimmed down version of OI called [core]
(wouldn't even include rich
or any terminal interface), [safe]
for semgrep, perhaps docker, etc, then eventually [all]
if we build features beyond safe mode with dependencies.
interpreter_intro_message.append(f"**Safe Mode**: {interpreter.safe_mode}\n\n>Note: **Safe Mode** requires `semgrep` (`pip install semgrep`)") | ||
if interpreter.safe_mode == "ask" or interpreter.safe_mode == "auto": | ||
if not check_for_package("semgrep"): | ||
interpreter_intro_message.append(f"**Safe Mode**: {interpreter.safe_mode}\n\n>Note: **Safe Mode** requires `semgrep` (`pip install semgrep`)") |
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.
Now we only need to show the semgrep
message if it isn't already in the user's current environment. If semgrep
is available and safe_mode
is enabled, semgrep
will be automatically loaded.
Great work Eric. Really happy to start seeing [extras] in OI— opens the door to OI serving different kinds of users more precisely. |
…afe-mode-docs chore: add better docs for safe_mode; load semgrep if available Former-commit-id: d588a1d Former-commit-id: 52a0e45f954a7492dcbbf298ac1bc8a481edec44 Former-commit-id: 424868a7bcadab255ac122367bb31c8b1898acde [formerly d23999f692e636d257530028f7ddac48c537e4ca] Former-commit-id: 4013995fcb4278e520468ec2c60e0f6fad008ca2
…afe-mode-docs chore: add better docs for safe_mode; load semgrep if available
Describe the changes you have made:
Update docs for
safe_mode
, dynamically loadsemgrep
if it's available.Reference any relevant issue (Fixes #000)
I have tested the code on the following OS:
AI Language Model (if applicable)