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

How to hook into the Text Stream #419

Closed
fire17 opened this issue Sep 17, 2023 · 7 comments · May be fixed by #1259
Closed

How to hook into the Text Stream #419

fire17 opened this issue Sep 17, 2023 · 7 comments · May be fixed by #1259
Labels
Bug Something isn't working

Comments

@fire17
Copy link

fire17 commented Sep 17, 2023

Hi there,
I cant believe I'm the first to ask this.....
but how can we hook into the text stream?

I'm building a UI for open-interpreter,
and I want to display the text stream in my UI, how do i access the text before it is printed?
Also I wish to send it to Elevenlabs Text2Voice (which supports streaming now)

Any help getting the live text will be helpfull
Thanks a lot and all the best!

Reproduce

  1. Add function hook, to interpreter, that will recieve all the text the interpreter genererates
    interpreter.chat(user_msg, text_stream_hook=myFunc)

Expected behavior

Text stream should be sent to myFunc

Screenshots

No response

Open Interpreter version

0.1.4

Python version

3.11.5

Operating System name and version

Windows 10

Additional context

I would love the hook to exist, but i'll also take where i need to intercept in the code as an answer for now... since i can continue from there...

@fire17 fire17 added the Bug Something isn't working label Sep 17, 2023
@fire17
Copy link
Author

fire17 commented Sep 18, 2023

I got elevenlabs to play the final output :)
but i need help getting to all the rest of the output
anyone?

@MrJarnould
Copy link
Contributor

@fire17 This seems more like a "Feature request – Suggest an idea for this project" than a "Bug – Create a report to help us improve". Perhaps you'll receive more interest from the community if you label this issue as such and follow the Feature request issue template.

@fire17
Copy link
Author

fire17 commented Sep 18, 2023

@MrJarnould I've marked it as bug since this text should be treated as first class citizen
And be fully accessible from interpreter object
So either it's available and should be better documented or it's a missing piece and not so much of a feature.

Got any suggestions ?

EDIT: I would have prefered choosing a "question" tag, even tried a blank non-templated issue, and tried removing the bug tag..
but i dont understand why you guys are focusing on the label rather than my actual question
anyhow.. i've manage to add streaming support to open-interpreter, please let me know if i should open a pr (in these kinds of projects it's sometimes better to ask)

@TheApeMachine
Copy link

"a missing piece" also known as a "feature"? First-class citizen notwithstanding, things can only be a bug if they were a feature first right? Or in another way, things have to exist before they can be broken.

@fire17 fire17 changed the title How to hook into the Text Stream + ELEVENLABS ! ! ! !!!!!!!!!! How to hook into the Text Stream Sep 22, 2023
@fire17
Copy link
Author

fire17 commented Sep 22, 2023

Well.... you guys let me know if you want a PR for streaming the text out

Meanwhile, sneak peak

All the best :)
🞉

@ericrallen
Copy link
Collaborator

Hey there, @fire17!

There are some docs about how to programmatically handle streaming responses from Open Interpreter.

@ericrallen
Copy link
Collaborator

Going to close this for now due to the requested functionality being documented now.

Feel free to reopen if there’s still an Issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants