mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Feature/sse (#3125)
* Base changes for ServerSide Events (instead of socket.io) * lint fixes * adding of interface and separate methods for streaming events * lint * first draft, handles both internal and external prediction end points. * lint fixes * additional internal end point for streaming and associated changes * return streamresponse as true to build agent flow * 1) JSON formatting for internal events 2) other fixes * 1) convert internal event to metadata to maintain consistency with external response * fix action and metadata streaming * fix for error when agent flow is aborted * prevent subflows from streaming and other code cleanup * prevent streaming from enclosed tools * add fix for preventing chaintool streaming * update lock file * add open when hidden to sse * Streaming errors * Streaming errors * add fix for showing error message --------- Co-authored-by: Henry <hzj94@hotmail.com>
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import { Request } from 'express'
|
||||
import { Server } from 'socket.io'
|
||||
import { StatusCodes } from 'http-status-codes'
|
||||
import { utilBuildChatflow } from '../../utils/buildChatflow'
|
||||
import { InternalFlowiseError } from '../../errors/internalFlowiseError'
|
||||
import { getErrorMessage } from '../../errors/utils'
|
||||
|
||||
const buildChatflow = async (fullRequest: Request, ioServer: Server) => {
|
||||
const buildChatflow = async (fullRequest: Request) => {
|
||||
try {
|
||||
const dbResponse = await utilBuildChatflow(fullRequest, ioServer)
|
||||
const dbResponse = await utilBuildChatflow(fullRequest)
|
||||
return dbResponse
|
||||
} catch (error) {
|
||||
throw new InternalFlowiseError(
|
||||
|
||||
Reference in New Issue
Block a user