-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Streaming Out OpenInterpreter's Output + Trigger (Y/N) Remotely #1259
base: main
Are you sure you want to change the base?
Conversation
… = myFunction) to process all of OI's output
… (Y/N/changes) from External process, Enabled Manual Code Changes, Enabled Make Changes Before Running (with ai) - Pre-Cleanup
…(Y/N/changes) from External process, Enabled Manual Code Changes, Enabled Make Changes Before Running (with ai) - Cleanup Done
…(Y/N/changes) from External process, Enabled Manual Code Changes, Enabled Make Changes Before Running (with ai) - Cleanup Done! Added Example/stream_out.py
↓ THIS FUNCTION IS CALLED ON ALL OI'S OUTPUTSdef stream_out_hook(partial, debug = False, *a, **kw): ↓ THIS IS OBJECT BEING WATCHED FOR TRIGGERING INPUTasync_input_data = {"input":None, "code_revision":None} ↑ CHANGING async_input_data["input"] WILL TRIGGER OI'S (Y/N/OTHER) CONFIRMATION INPUTinterpreter.chat(stream_out = stream_out_hook, async_input = async_input_data) |
Hi @KillianLucas :)
Please let me know what you think about MagicLLight, and about this PR, I think it will really help others build on top of OpenInterpreter. I currently can't publish MagicLLight with OI as a requirement until this PR is pushed, so I would love it if we could get this merged :) Thanks a lot and all the best! 🌸 PS - would love to get an interview when possible 😇 |
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.
interpreter/core/core.py
Describe the changes you have made:
This PR Adds the following Abilities:
Reference any relevant issues:
Fixes #419 and allows Operation of OI from another GUI
Snapshots from
MagicLLight
which usesstream_out
to get OI's output andasync_input
to trigger OI's (Y/N/Other) confirmation inputMagicLLight code coming soon to a repo near you
This PR will help others Integrate and build on top of OpenInterpreter
You can stream out all the output from Open Interpreter by adding
stream_output=function
in aninterpreter.chat()
call (optional).You can also trigger OpenInterpreter's (Y/N) Confirmation Input REMOTELY by passing
async_input={"input":None, "code_revision":None}
changing the dict['input'] will trigger the (Y/N) confirmation, place your answer thereAdditionally, you can pass New Code to dict['code_revision'] and it will be executed instead of the last codeblock (usefull for manual editing)
For a more comprehensive & full example, please checkout examples/stream_out.py
Pre-Submission Checklist (optional but appreciated):
docs/CONTRIBUTING.md
docs/ROADMAP.md
OS Tests (optional but appreciated):
Made sure to make the code well documented and clean :)
Thanks a lot and all the best! 🌈