webflux streaming
parent
8731898e6f
commit
20930e7122
@ -0,0 +1,10 @@
|
||||
package com.supervision.model.dify;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class OutputsData implements Serializable {
|
||||
private String answer;
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.supervision.model.dify;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class StreamResponse implements Serializable {
|
||||
|
||||
/**
|
||||
* 不同模式下的事件类型.
|
||||
*/
|
||||
private String event;
|
||||
|
||||
/**
|
||||
* agent_thought id.
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 任务ID.
|
||||
*/
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 消息唯一ID.
|
||||
*/
|
||||
private String messageId;
|
||||
|
||||
/**
|
||||
* LLM 返回文本块内容.
|
||||
*/
|
||||
private String answer;
|
||||
|
||||
/**
|
||||
* 创建时间戳.
|
||||
*/
|
||||
private Long createdAt;
|
||||
|
||||
/**
|
||||
* 会话 ID.
|
||||
*/
|
||||
private String conversationId;
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.supervision.model.dify;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class StreamResponseData implements Serializable {
|
||||
private String id;
|
||||
private String workflow_id;
|
||||
private String status;
|
||||
private Long created_at;
|
||||
private Long finished_at;
|
||||
private OutputsData outputs;
|
||||
}
|
Loading…
Reference in New Issue