fix: event must be capitalized when streaming (#2030)

main
Zhj 1 month ago committed by GitHub
parent 6d8cde9665
commit 1f9e1cb1c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      backend/application/workflow/workflow.go

@ -1322,10 +1322,10 @@ func mergeBatchModeNodes(parent, inner *workflow.NodeResult) *workflow.NodeResul
type StreamRunEventType string type StreamRunEventType string
const ( const (
DoneEvent StreamRunEventType = "done" DoneEvent StreamRunEventType = "Done"
MessageEvent StreamRunEventType = "message" MessageEvent StreamRunEventType = "Message"
ErrEvent StreamRunEventType = "error" ErrEvent StreamRunEventType = "Error"
InterruptEvent StreamRunEventType = "interrupt" InterruptEvent StreamRunEventType = "Interrupt"
) )
func convertStreamRunEvent(workflowID int64) func(msg *entity.Message) (res *workflow.OpenAPIStreamRunFlowResponse, err error) { func convertStreamRunEvent(workflowID int64) func(msg *entity.Message) (res *workflow.OpenAPIStreamRunFlowResponse, err error) {

Loading…
Cancel
Save