Streaming

LangFlux supports streaming back to your front end application when the final node is a Chain or OpenAI Function Agent.

  1. Install socket.io-client to your front-end application

or using npm

Refer official docs for more installation options.

  1. Import it

  1. Establish connection

  1. Listen to connection

  1. Send query with socketIOClientId

  1. Listen to token stream

  1. Disconnect connection

Last updated

Was this helpful?