|
@@ -0,0 +1,184 @@
|
|
|
|
+package cn.iocoder.yudao.module.game.adpter;
|
|
|
|
+
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+public class DifyResponse {
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * event : workflow_finished
|
|
|
|
+ * workflow_run_id : bad54afd-3650-4b24-86e6-c625fcc600cb
|
|
|
|
+ * task_id : 15712ca3-3350-4cd7-a0ad-c1d53350c9a5
|
|
|
|
+ * data : {"id":"bad54afd-3650-4b24-86e6-c625fcc600cb","workflow_id":"26b654ed-c5eb-498a-8f28-c303dcf3349b",
|
|
|
|
+ * "sequence_number":24,"status":"succeeded","outputs":{"text":"INSERT INTO `ruoyi-vue-pro`.`game_character_info`
|
|
|
|
+ * (player_name, level, combat_power, profession) VALUES('小杰', '8转216级', 40261, '道士'),('小沐沐', '8转200级', 30111,
|
|
|
|
+ * '法师'),('天命', '8转199级', 30384, '道士'),('司令', '8转197级', 24999, '法师'),('祖承泽', '7转185级', 21333, '法师'),('tx小道',
|
|
|
|
+ * '7转168级', 6792, '道士'),('S5563.神经侠侣', '8转188级', 21368, '法师'),('天~虎', '8转196级', 23122, '法师'),('王者', '7转174级',
|
|
|
|
+ * 15664, '战士'),('平凡爱人', '7转179级', 12249, '法师'),('没穿内裤', '8转225级', 49935, '法师'),('S5596.蜡笔小新', '8转187级', 22172,
|
|
|
|
+ * '法师'),('S5576.太阳的心', '7转183级', 19011, '法师');"},"error":null,"elapsed_time":16.629782980307937,
|
|
|
|
+ * "total_tokens":1773,"total_steps":4,"created_by":{"id":"8e1c763e-5dd2-4ccb-a633-eee77b10f9e9","user":"abc-123"
|
|
|
|
+ * },"created_at":1741768563,"finished_at":1741768580,"exceptions_count":0,"files":[]}
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ private String event;
|
|
|
|
+ private String workflow_run_id;
|
|
|
|
+ private String task_id;
|
|
|
|
+ private DataBean data;
|
|
|
|
+
|
|
|
|
+ // {"event": "workflow_finished", "workflow_run_id": "bad54afd-3650-4b24-86e6-c625fcc600cb", "task_id":
|
|
|
|
+ // "15712ca3-3350-4cd7-a0ad-c1d53350c9a5", "data": {"id": "bad54afd-3650-4b24-86e6-c625fcc600cb", "workflow_id":
|
|
|
|
+ // "26b654ed-c5eb-498a-8f28-c303dcf3349b", "sequence_number": 24, "status": "succeeded", "outputs": {"text":
|
|
|
|
+ // "INSERT INTO `ruoyi-vue-pro`.`game_character_info` (player_name, level, combat_power, profession) VALUES('小杰',
|
|
|
|
+ // '8转216级', 40261, '道士'),('小沐沐', '8转200级', 30111, '法师'),('天命', '8转199级', 30384, '道士'),('司令', '8转197级', 24999,
|
|
|
|
+ // '法师'),('祖承泽', '7转185级', 21333, '法师'),('tx小道', '7转168级', 6792, '道士'),('S5563.神经侠侣', '8转188级', 21368, '法师'),
|
|
|
|
+ // ('天~虎', '8转196级', 23122, '法师'),('王者', '7转174级', 15664, '战士'),('平凡爱人', '7转179级', 12249, '法师'),('没穿内裤',
|
|
|
|
+ // '8转225级', 49935, '法师'),('S5596.蜡笔小新', '8转187级', 22172, '法师'),('S5576.太阳的心', '7转183级', 19011, '法师');"},
|
|
|
|
+ // "error": null, "elapsed_time": 16.629782980307937, "total_tokens": 1773, "total_steps": 4, "created_by":
|
|
|
|
+ // {"id": "8e1c763e-5dd2-4ccb-a633-eee77b10f9e9", "user": "abc-123"}, "created_at": 1741768563, "finished_at":
|
|
|
|
+ // 1741768580, "exceptions_count": 0, "files": []}}
|
|
|
|
+
|
|
|
|
+ public String getEvent() {return event;}
|
|
|
|
+
|
|
|
|
+ public void setEvent(String event) {this.event = event;}
|
|
|
|
+
|
|
|
|
+ public String getWorkflow_run_id() {return workflow_run_id;}
|
|
|
|
+
|
|
|
|
+ public void setWorkflow_run_id(String workflow_run_id) {this.workflow_run_id = workflow_run_id;}
|
|
|
|
+
|
|
|
|
+ public String getTask_id() {return task_id;}
|
|
|
|
+
|
|
|
|
+ public void setTask_id(String task_id) {this.task_id = task_id;}
|
|
|
|
+
|
|
|
|
+ public DataBean getData() {return data;}
|
|
|
|
+
|
|
|
|
+ public void setData(DataBean data) {this.data = data;}
|
|
|
|
+
|
|
|
|
+ public static class DataBean {
|
|
|
|
+ /**
|
|
|
|
+ * id : bad54afd-3650-4b24-86e6-c625fcc600cb
|
|
|
|
+ * workflow_id : 26b654ed-c5eb-498a-8f28-c303dcf3349b
|
|
|
|
+ * sequence_number : 24
|
|
|
|
+ * status : succeeded
|
|
|
|
+ * outputs : {"text":"INSERT INTO `ruoyi-vue-pro`.`game_character_info` (player_name, level, combat_power,
|
|
|
|
+ * profession) VALUES('小杰', '8转216级', 40261, '道士'),('小沐沐', '8转200级', 30111, '法师'),('天命', '8转199级', 30384,
|
|
|
|
+ * '道士'),('司令', '8转197级', 24999, '法师'),('祖承泽', '7转185级', 21333, '法师'),('tx小道', '7转168级', 6792, '道士'),('S5563
|
|
|
|
+ * .神经侠侣', '8转188级', 21368, '法师'),('天~虎', '8转196级', 23122, '法师'),('王者', '7转174级', 15664, '战士'),('平凡爱人',
|
|
|
|
+ * '7转179级', 12249, '法师'),('没穿内裤', '8转225级', 49935, '法师'),('S5596.蜡笔小新', '8转187级', 22172, '法师'),('S5576
|
|
|
|
+ * .太阳的心', '7转183级', 19011, '法师');"}
|
|
|
|
+ * error : null
|
|
|
|
+ * elapsed_time : 16.629782980307937
|
|
|
|
+ * total_tokens : 1773
|
|
|
|
+ * total_steps : 4
|
|
|
|
+ * created_by : {"id":"8e1c763e-5dd2-4ccb-a633-eee77b10f9e9","user":"abc-123"}
|
|
|
|
+ * created_at : 1741768563
|
|
|
|
+ * finished_at : 1741768580
|
|
|
|
+ * exceptions_count : 0
|
|
|
|
+ * files : []
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ private String id;
|
|
|
|
+ private String workflow_id;
|
|
|
|
+ private int sequence_number;
|
|
|
|
+ private String status;
|
|
|
|
+ private OutputsBean outputs;
|
|
|
|
+ private Object error;
|
|
|
|
+ private double elapsed_time;
|
|
|
|
+ private int total_tokens;
|
|
|
|
+ private int total_steps;
|
|
|
|
+ private CreatedByBean created_by;
|
|
|
|
+ private int created_at;
|
|
|
|
+ private int finished_at;
|
|
|
|
+ private int exceptions_count;
|
|
|
|
+ private List<?> files;
|
|
|
|
+
|
|
|
|
+ public String getId() {return id;}
|
|
|
|
+
|
|
|
|
+ public void setId(String id) {this.id = id;}
|
|
|
|
+
|
|
|
|
+ public String getWorkflow_id() {return workflow_id;}
|
|
|
|
+
|
|
|
|
+ public void setWorkflow_id(String workflow_id) {this.workflow_id = workflow_id;}
|
|
|
|
+
|
|
|
|
+ public int getSequence_number() {return sequence_number;}
|
|
|
|
+
|
|
|
|
+ public void setSequence_number(int sequence_number) {this.sequence_number = sequence_number;}
|
|
|
|
+
|
|
|
|
+ public String getStatus() {return status;}
|
|
|
|
+
|
|
|
|
+ public void setStatus(String status) {this.status = status;}
|
|
|
|
+
|
|
|
|
+ public OutputsBean getOutputs() {return outputs;}
|
|
|
|
+
|
|
|
|
+ public void setOutputs(OutputsBean outputs) {this.outputs = outputs;}
|
|
|
|
+
|
|
|
|
+ public Object getError() {return error;}
|
|
|
|
+
|
|
|
|
+ public void setError(Object error) {this.error = error;}
|
|
|
|
+
|
|
|
|
+ public double getElapsed_time() {return elapsed_time;}
|
|
|
|
+
|
|
|
|
+ public void setElapsed_time(double elapsed_time) {this.elapsed_time = elapsed_time;}
|
|
|
|
+
|
|
|
|
+ public int getTotal_tokens() {return total_tokens;}
|
|
|
|
+
|
|
|
|
+ public void setTotal_tokens(int total_tokens) {this.total_tokens = total_tokens;}
|
|
|
|
+
|
|
|
|
+ public int getTotal_steps() {return total_steps;}
|
|
|
|
+
|
|
|
|
+ public void setTotal_steps(int total_steps) {this.total_steps = total_steps;}
|
|
|
|
+
|
|
|
|
+ public CreatedByBean getCreated_by() {return created_by;}
|
|
|
|
+
|
|
|
|
+ public void setCreated_by(CreatedByBean created_by) {this.created_by = created_by;}
|
|
|
|
+
|
|
|
|
+ public int getCreated_at() {return created_at;}
|
|
|
|
+
|
|
|
|
+ public void setCreated_at(int created_at) {this.created_at = created_at;}
|
|
|
|
+
|
|
|
|
+ public int getFinished_at() {return finished_at;}
|
|
|
|
+
|
|
|
|
+ public void setFinished_at(int finished_at) {this.finished_at = finished_at;}
|
|
|
|
+
|
|
|
|
+ public int getExceptions_count() {return exceptions_count;}
|
|
|
|
+
|
|
|
|
+ public void setExceptions_count(int exceptions_count) {this.exceptions_count = exceptions_count;}
|
|
|
|
+
|
|
|
|
+ public List<?> getFiles() {return files;}
|
|
|
|
+
|
|
|
|
+ public void setFiles(List<?> files) {this.files = files;}
|
|
|
|
+
|
|
|
|
+ public static class OutputsBean {
|
|
|
|
+ /**
|
|
|
|
+ * text : INSERT INTO `ruoyi-vue-pro`.`game_character_info` (player_name, level, combat_power,
|
|
|
|
+ * profession) VALUES('小杰', '8转216级', 40261, '道士'),('小沐沐', '8转200级', 30111, '法师'),('天命', '8转199级', 30384,
|
|
|
|
+ * '道士'),('司令', '8转197级', 24999, '法师'),('祖承泽', '7转185级', 21333, '法师'),('tx小道', '7转168级', 6792, '道士'),
|
|
|
|
+ * ('S5563.神经侠侣', '8转188级', 21368, '法师'),('天~虎', '8转196级', 23122, '法师'),('王者', '7转174级', 15664, '战士'),
|
|
|
|
+ * ('平凡爱人', '7转179级', 12249, '法师'),('没穿内裤', '8转225级', 49935, '法师'),('S5596.蜡笔小新', '8转187级', 22172, '法师'),
|
|
|
|
+ * ('S5576.太阳的心', '7转183级', 19011, '法师');
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ private String text;
|
|
|
|
+
|
|
|
|
+ public String getText() {return text;}
|
|
|
|
+
|
|
|
|
+ public void setText(String text) {this.text = text;}
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static class CreatedByBean {
|
|
|
|
+ /**
|
|
|
|
+ * id : 8e1c763e-5dd2-4ccb-a633-eee77b10f9e9
|
|
|
|
+ * user : abc-123
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ private String id;
|
|
|
|
+ private String user;
|
|
|
|
+
|
|
|
|
+ public String getId() {return id;}
|
|
|
|
+
|
|
|
|
+ public void setId(String id) {this.id = id;}
|
|
|
|
+
|
|
|
|
+ public String getUser() {return user;}
|
|
|
|
+
|
|
|
|
+ public void setUser(String user) {this.user = user;}
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|