diff --git a/relay/channel/dify/relay-dify.go b/relay/channel/dify/relay-dify.go index a0fd1f07..b806aa18 100644 --- a/relay/channel/dify/relay-dify.go +++ b/relay/channel/dify/relay-dify.go @@ -198,6 +198,12 @@ func streamResponseDify2OpenAI(difyResponse DifyChunkChatCompletionResponse) *dt choice.Delta.SetReasoningContent(text + "\n") } } else if difyResponse.Event == "message" || difyResponse.Event == "agent_message" { + if difyResponse.Answer == "
Thinking... \n" { + difyResponse.Answer = "" + } else if difyResponse.Answer == "
" { + difyResponse.Answer = "" + } + choice.Delta.SetContentString(difyResponse.Answer) } response.Choices = append(response.Choices, choice)