fix
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.senmesh.sdk.dify.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -28,10 +29,12 @@ public class DifyChatRequest implements Serializable {
|
||||
private String query;
|
||||
|
||||
/** 响应模式: blocking/streaming */
|
||||
@JsonProperty("response_mode")
|
||||
@Builder.Default
|
||||
private String responseMode = "blocking";
|
||||
|
||||
/** 会话ID */
|
||||
@JsonProperty("conversation_id")
|
||||
private String conversationId;
|
||||
|
||||
/** 用户标识 */
|
||||
@@ -55,6 +58,7 @@ public class DifyChatRequest implements Serializable {
|
||||
private String type;
|
||||
|
||||
/** 传输方式: remote_url/local_file */
|
||||
@JsonProperty("transfer_method")
|
||||
@Builder.Default
|
||||
private String transferMethod = "local_file";
|
||||
|
||||
@@ -62,6 +66,7 @@ public class DifyChatRequest implements Serializable {
|
||||
private String url;
|
||||
|
||||
/** 上传文件ID */
|
||||
@JsonProperty("upload_file_id")
|
||||
private String uploadFileId;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.senmesh.sdk.dify.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -21,9 +22,11 @@ public class DifyChatResponse implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
@JsonProperty("message_id")
|
||||
private String messageId;
|
||||
|
||||
/** 会话ID */
|
||||
@JsonProperty("conversation_id")
|
||||
private String conversationId;
|
||||
|
||||
/** 模式 */
|
||||
@@ -36,6 +39,7 @@ public class DifyChatResponse implements Serializable {
|
||||
private Metadata metadata;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonProperty("created_at")
|
||||
private Long createdAt;
|
||||
|
||||
/**
|
||||
@@ -53,6 +57,7 @@ public class DifyChatResponse implements Serializable {
|
||||
private Usage usage;
|
||||
|
||||
/** 检索器资源 */
|
||||
@JsonProperty("retriever_resources")
|
||||
private List<RetrieverResource> retrieverResources;
|
||||
}
|
||||
|
||||
@@ -68,33 +73,43 @@ public class DifyChatResponse implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 提示词token数 */
|
||||
@JsonProperty("prompt_tokens")
|
||||
private Integer promptTokens;
|
||||
|
||||
/** 提示词单位价格 */
|
||||
@JsonProperty("prompt_unit_price")
|
||||
private String promptUnitPrice;
|
||||
|
||||
/** 提示词价格单位 */
|
||||
@JsonProperty("prompt_price_unit")
|
||||
private String promptPriceUnit;
|
||||
|
||||
/** 提示词价格 */
|
||||
@JsonProperty("prompt_price")
|
||||
private String promptPrice;
|
||||
|
||||
/** 完成token数 */
|
||||
@JsonProperty("completion_tokens")
|
||||
private Integer completionTokens;
|
||||
|
||||
/** 完成单位价格 */
|
||||
@JsonProperty("completion_unit_price")
|
||||
private String completionUnitPrice;
|
||||
|
||||
/** 完成价格单位 */
|
||||
@JsonProperty("completion_price_unit")
|
||||
private String completionPriceUnit;
|
||||
|
||||
/** 完成价格 */
|
||||
@JsonProperty("completion_price")
|
||||
private String completionPrice;
|
||||
|
||||
/** 总token数 */
|
||||
@JsonProperty("total_tokens")
|
||||
private Integer totalTokens;
|
||||
|
||||
/** 总价格 */
|
||||
@JsonProperty("total_price")
|
||||
private String totalPrice;
|
||||
|
||||
/** 货币 */
|
||||
@@ -119,18 +134,23 @@ public class DifyChatResponse implements Serializable {
|
||||
private Integer position;
|
||||
|
||||
/** 数据集ID */
|
||||
@JsonProperty("dataset_id")
|
||||
private String datasetId;
|
||||
|
||||
/** 数据集名称 */
|
||||
@JsonProperty("dataset_name")
|
||||
private String datasetName;
|
||||
|
||||
/** 文档ID */
|
||||
@JsonProperty("document_id")
|
||||
private String documentId;
|
||||
|
||||
/** 文档名称 */
|
||||
@JsonProperty("document_name")
|
||||
private String documentName;
|
||||
|
||||
/** 分段ID */
|
||||
@JsonProperty("segment_id")
|
||||
private String segmentId;
|
||||
|
||||
/** 分数 */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.senmesh.sdk.dify.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import java.io.Serializable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@@ -8,7 +9,7 @@ import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* Dify文件上传响应
|
||||
*
|
||||
*
|
||||
* @author sr
|
||||
*/
|
||||
@Data
|
||||
@@ -16,29 +17,31 @@ import lombok.NoArgsConstructor;
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class DifyFileUploadResponse implements Serializable {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/** 文件ID */
|
||||
private String id;
|
||||
|
||||
|
||||
/** 文件名 */
|
||||
private String name;
|
||||
|
||||
|
||||
/** 文件大小 */
|
||||
private Long size;
|
||||
|
||||
|
||||
/** 文件扩展名 */
|
||||
private String extension;
|
||||
|
||||
|
||||
/** MIME类型 */
|
||||
@JsonProperty("mime_type")
|
||||
private String mimeType;
|
||||
|
||||
|
||||
/** 创建者 */
|
||||
@JsonProperty("created_by")
|
||||
private String createdBy;
|
||||
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonProperty("created_at")
|
||||
private Long createdAt;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user