Skip to content
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

Custom code interpreter #655

Closed
alita-moore opened this issue Oct 18, 2023 · 8 comments
Closed

Custom code interpreter #655

alita-moore opened this issue Oct 18, 2023 · 8 comments
Labels
Enhancement New feature or request

Comments

@alita-moore
Copy link

Is your feature request related to a problem? Please describe.

I want to execute code but that's very insecure. Running this on a server is dangerous.

Describe the solution you'd like

So instead it seems optimal to run that code somewhere else. Perhaps on a remote environment like https://github.com/e2b-dev/e2b provides. It would be nice to be able to provide a custom code interpreter so that it runs the code on a remote server instead of locally.

Describe alternatives you've considered

I have considered running this on a serverless function, which may forgo some of the complexities of running the code on a remote sandbox.

Additional context

No response

@alita-moore alita-moore added the Enhancement New feature or request label Oct 18, 2023
@alita-moore
Copy link
Author

For reference, I think that this is a superior solution to what is proposed in #654 (running this on a serverless function). That's because it seems to make more sense to me that this project be focused on prompting the llm and parsing the response (and doing so for lots of llms) rather than the execution itself. Perhaps that's better offloaded to a different project?

@KillianLucas
Copy link
Collaborator

KillianLucas commented Oct 18, 2023 via email

@alita-moore
Copy link
Author

I see, well I'm mostly interested in building a product similar to openai but for my own use case. The challenge being that running the code securely and managing the sessions can be quite tedious and dangerous. So ideally it would be something that can be handled for me.

If you were to build the chat.openinterpreter.com example that you said, how would you handle hosting the code execution? Would you run them in docker containers on a single server or run them in serverless functions (or something similar) or anything else?

@alita-moore
Copy link
Author

by the way, do you intend on supporting a simpler input output? i.e. input a list of messages and output the answer rather than having to do interpreter.messages = messages, interpreter.chat(messages[-1]), interpreter.reset()?

@KillianLucas
Copy link
Collaborator

KillianLucas commented Oct 18, 2023 via email

@alita-moore
Copy link
Author

yeah that sounds great.

wrt the way you store messages it's hard to say for sure. The way we're doing it is by utilizing an even convoluted approach. Basically, all chats are made up of nodes, each node links only to its children, a chat is defined by a root node. Then, each node contains a list of content and that content can be of a certain type (e.g. code, message, output, etc.).

Generally, I try to maximize for flexibility. I'm by no means an authority on that topic, though. Sandi Metz has some awesome points about this in her book: http://www.r-5.org/files/books/computers/dev-teams/diagrams/Sandi_Metz-Practical_Object-Oriented_Design_in_Ruby-EN.pdf

I am trying to use my own message storage system because I am trying to defend my application's domain. I define domain as the data structures that define our systems. Meaning, that we communicate with our apps internally within our domain, and then we communicate with open interpreter through open interpreter's domain which is outside of our domain. So to maintain all information within our domain we want to map everything and store it according to our principles and use cases. But certainly as an out of the box solution having it managed by open interpreter makes a lot of sense.

@alita-moore
Copy link
Author

oh also, it's a security risk to store user's messages even temporarily in a system that we don't control. Especially if that system is a shared execution environment where arbitrary code is executed..

@MikeBirdTech
Copy link
Collaborator

Closing this stale issue. Please create a new issue if the problem is not resolved or explained in the documentation. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants