atisharma / chasm_engine

CHAracter State Management - a generative text adventure (engine)
https://chasm.run
GNU Affero General Public License v3.0
59 stars 5 forks source link

Streaming responses #12

Open atisharma opened 1 month ago

atisharma commented 1 month ago

It would be nice to have streaming responses. But, because of the design of the communication between chasm client and server, streaming responses are not trivial. The connection is zmq REQ-ROUTER, so the server only responds to client requests rather than simply broadcasts.

One way might be to redesign the client UI so that responses are async updated to screen in a separate area from the user input. This adds complexity though. The least surprising way might be to lock to user input whilst receiving stream updates.