Skip to content

[Issue]: How to use IOWebsockets with Flask? #2611

Closed
@Tylersuard

Description

@Tylersuard

Describe the issue

Currently every example of websockets in the agentchat_websockets.ipynb notebook involves creating a server like so:

with IOWebsockets.run_server_in_thread(on_connect=on_connect, port=8765) as uri:

I do not want to use this server, I want to use Flask. I have written a wrapper around the IOWebsockets object and passed in my websocket as an argument. The code runs but nothing ever gets sent back across to the frontend. How can I use the IOWebsockets class without the .run_server_in_thread method?

Steps to reproduce

No response

Screenshots and logs

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.2Issues which are related to the pre 0.4 codebaseneeds-triagestreamingStreaming output to websocket

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions