From fbce36238e09416b93207d231375bc8efeade0df Mon Sep 17 00:00:00 2001 From: CalciumIon <1808837298@qq.com> Date: Tue, 30 Jul 2024 17:30:40 +0800 Subject: [PATCH] feat: support dify agent --- relay/channel/dify/relay-dify.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relay/channel/dify/relay-dify.go b/relay/channel/dify/relay-dify.go index c674ba101..66ba83979 100644 --- a/relay/channel/dify/relay-dify.go +++ b/relay/channel/dify/relay-dify.go @@ -53,7 +53,7 @@ func streamResponseDify2OpenAI(difyResponse DifyChunkChatCompletionResponse) *dt choice.Delta.SetContentString("Workflow: " + difyResponse.Data.WorkflowId + "\n") } else if constant.DifyDebug && difyResponse.Event == "node_started" { choice.Delta.SetContentString("Node: " + difyResponse.Data.NodeId + "\n") - } else if difyResponse.Event == "message" { + } else if difyResponse.Event == "message" || difyResponse.Event == "agent_message" { choice.Delta.SetContentString(difyResponse.Answer) } response.Choices = append(response.Choices, choice)