-
Notifications
You must be signed in to change notification settings - Fork 365
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
Agents deserve freedom. Freedom is the path to success! additional_authorized_imports=['*'] #129
base: main
Are you sure you want to change the base?
Agents deserve freedom. Freedom is the path to success! additional_authorized_imports=['*'] #129
Conversation
The following code produced by DeepSeek fails: ``` def generate_mandelbrot(width, height, x_min, x_max, y_min, y_max, max_iter): image = np.zeros((height, width)) for row in range(height): for col in range(width): x = x_min + (x_max - x_min) * col / width y = y_min + (y_max - y_min) * row / height c = complex(x, y) m = mandelbrot(c, max_iter) color = 1 - m / max_iter image[row, col] = color return image ```
update from hf
Update from HF.
Update from HF
Hello @joaopauloschuler, I love your idea to finally free the agents!!! However I feel like the "*" formulation is not very intuitive. Often if we want to allow all imports we would need to process things differently, for instance in E2B executor we cannot allow this at all (because that would mean we have to install all possible pypi packages on the sandbox). Also since it's quite unsafe I think we should not put it on the same level as yet another import. So what do you think about making it an additional flag If you agree, please propose the implementation, and I'll do the doc! |
@aymeric-roucher , |
Try this instead maybe...
Explanation of Changes: |
Letting the agents to import everything they want gives interesting results. I run the agents in a virtualized/safe environment. As an example, deep seek sometimes creates a python file to then import it. In a recent experiment, it started creating a database and running SQL. The agents can import os and then start running linux commands (this is so cool).
Anyway, this pull request allows the following:
Notice the '*' at the end. This will allow all imports.