Streaming Out OpenInterpreter's Output + Trigger (Y/N) Remotely #1259
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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! 🌈