Skip to content

How to hook into the Text Stream #419

Closed
@fire17

Description

@fire17

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...

Activity

fire17

fire17 commented on Sep 18, 2023

@fire17
Author

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

MrJarnould

MrJarnould commented on Sep 18, 2023

@MrJarnould
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

fire17 commented on Sep 18, 2023

@fire17
Author

@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

TheApeMachine commented on Sep 19, 2023

@TheApeMachine

"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.

changed the title [-]How to hook into the Text Stream + ELEVENLABS ! ! ! !!!!!!!!!! [/-] [+]How to hook into the Text Stream[/+] on Sep 22, 2023
fire17

fire17 commented on Sep 22, 2023

@fire17
Author

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

Meanwhile, sneak peak

All the best :)
🞉

ericrallen

ericrallen commented on Oct 10, 2023

@ericrallen
Collaborator
ericrallen

ericrallen commented on Oct 12, 2023

@ericrallen
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @ericrallen@fire17@TheApeMachine@MrJarnould

      Issue actions

        How to hook into the Text Stream · Issue #419 · OpenInterpreter/open-interpreter