Streaming
Streaming
Learn when you can stream back to your front end
Flowise supports streaming back to your front end application when the final node is a Chain or Tool Agent.
Setup
Install socket.io-client to your front-end application
yarn add socket.io-clientRefer official docs for more installation options.
Import it
import socketIOClient from 'socket.io-client'Establish connection
const socket = socketIOClient("http://localhost:3000") //flowise urlListen to connection
import { useState } from 'react'
const [socketIOClientId, setSocketIOClientId] = useState('');
socket.on('connect', () => {
setSocketIOClientId(socket.id)
});Send query with
socketIOClientId
Listen to token stream
Disconnect connection
PreviousEmbedNextTelemetry
Last updated 1 month ago