mirror of
				https://github.com/linux-do/new-api.git
				synced 2025-11-04 13:23:42 +08:00 
			
		
		
		
	feat: support dify agent
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user