dify
This commit is contained in:
@@ -10,7 +10,8 @@ public enum ResourceType {
|
||||
ACHIEVEMENT(6, "成就", "成就"),
|
||||
CRONTAB_TASK(7, "定时任务", "定时任务"),
|
||||
BANNER(8, "轮播图", "轮播图"),
|
||||
TAG(9, "标签", "标签");
|
||||
TAG(9, "标签", "标签"),
|
||||
AI_KNOWLEDGE(10, "AI知识库", "AI知识库");
|
||||
|
||||
private int code;
|
||||
private String name;
|
||||
|
||||
@@ -24,6 +24,11 @@ public class TbAiAgentConfig extends BaseDTO {
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* @description 智能体描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* @description 系统提示词
|
||||
*/
|
||||
@@ -54,6 +59,16 @@ public class TbAiAgentConfig extends BaseDTO {
|
||||
*/
|
||||
private BigDecimal topP;
|
||||
|
||||
/**
|
||||
* @description Dify应用ID
|
||||
*/
|
||||
private String difyAppId;
|
||||
|
||||
/**
|
||||
* @description Dify应用API密钥
|
||||
*/
|
||||
private String difyApiKey;
|
||||
|
||||
/**
|
||||
* @description 状态(0禁用 1启用)
|
||||
*/
|
||||
@@ -85,6 +100,14 @@ public class TbAiAgentConfig extends BaseDTO {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getSystemPrompt() {
|
||||
return systemPrompt;
|
||||
}
|
||||
@@ -133,6 +156,22 @@ public class TbAiAgentConfig extends BaseDTO {
|
||||
this.topP = topP;
|
||||
}
|
||||
|
||||
public String getDifyAppId() {
|
||||
return difyAppId;
|
||||
}
|
||||
|
||||
public void setDifyAppId(String difyAppId) {
|
||||
this.difyAppId = difyAppId;
|
||||
}
|
||||
|
||||
public String getDifyApiKey() {
|
||||
return difyApiKey;
|
||||
}
|
||||
|
||||
public void setDifyApiKey(String difyApiKey) {
|
||||
this.difyApiKey = difyApiKey;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -19,21 +19,51 @@ public class TbAiConversation extends BaseDTO {
|
||||
*/
|
||||
private String userID;
|
||||
|
||||
/**
|
||||
* @description 智能体ID
|
||||
*/
|
||||
private String agentID;
|
||||
|
||||
/**
|
||||
* @description 会话标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* @description 对话摘要(AI自动生成)
|
||||
*/
|
||||
private String summary;
|
||||
|
||||
/**
|
||||
* @description Dify会话ID
|
||||
*/
|
||||
private String difyConversationId;
|
||||
|
||||
/**
|
||||
* @description 状态(0已结束 1进行中)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* @description 是否收藏(0否 1是)
|
||||
*/
|
||||
private Boolean isFavorite;
|
||||
|
||||
/**
|
||||
* @description 是否置顶(0否 1是)
|
||||
*/
|
||||
private Boolean isPinned;
|
||||
|
||||
/**
|
||||
* @description 消息数量
|
||||
*/
|
||||
private Integer messageCount;
|
||||
|
||||
/**
|
||||
* @description 总Token消耗
|
||||
*/
|
||||
private Integer totalTokens;
|
||||
|
||||
/**
|
||||
* @description 最后消息时间
|
||||
*/
|
||||
@@ -47,6 +77,14 @@ public class TbAiConversation extends BaseDTO {
|
||||
this.userID = userID;
|
||||
}
|
||||
|
||||
public String getAgentID() {
|
||||
return agentID;
|
||||
}
|
||||
|
||||
public void setAgentID(String agentID) {
|
||||
this.agentID = agentID;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
@@ -55,6 +93,22 @@ public class TbAiConversation extends BaseDTO {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getSummary() {
|
||||
return summary;
|
||||
}
|
||||
|
||||
public void setSummary(String summary) {
|
||||
this.summary = summary;
|
||||
}
|
||||
|
||||
public String getDifyConversationId() {
|
||||
return difyConversationId;
|
||||
}
|
||||
|
||||
public void setDifyConversationId(String difyConversationId) {
|
||||
this.difyConversationId = difyConversationId;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
@@ -63,6 +117,22 @@ public class TbAiConversation extends BaseDTO {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Boolean getIsFavorite() {
|
||||
return isFavorite;
|
||||
}
|
||||
|
||||
public void setIsFavorite(Boolean isFavorite) {
|
||||
this.isFavorite = isFavorite;
|
||||
}
|
||||
|
||||
public Boolean getIsPinned() {
|
||||
return isPinned;
|
||||
}
|
||||
|
||||
public void setIsPinned(Boolean isPinned) {
|
||||
this.isPinned = isPinned;
|
||||
}
|
||||
|
||||
public Integer getMessageCount() {
|
||||
return messageCount;
|
||||
}
|
||||
@@ -71,6 +141,14 @@ public class TbAiConversation extends BaseDTO {
|
||||
this.messageCount = messageCount;
|
||||
}
|
||||
|
||||
public Integer getTotalTokens() {
|
||||
return totalTokens;
|
||||
}
|
||||
|
||||
public void setTotalTokens(Integer totalTokens) {
|
||||
this.totalTokens = totalTokens;
|
||||
}
|
||||
|
||||
public Date getLastMessageTime() {
|
||||
return lastMessageTime;
|
||||
}
|
||||
|
||||
@@ -14,12 +14,17 @@ public class TbAiKnowledge extends BaseDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 知识标题
|
||||
* @description 知识库标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* @description 知识内容
|
||||
* @description 知识库描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* @description 知识内容(手动添加时使用)
|
||||
*/
|
||||
private String content;
|
||||
|
||||
@@ -53,21 +58,51 @@ public class TbAiKnowledge extends BaseDTO {
|
||||
*/
|
||||
private String tags;
|
||||
|
||||
/**
|
||||
* @description Dify知识库ID(Dataset ID)
|
||||
*/
|
||||
private String difyDatasetId;
|
||||
|
||||
/**
|
||||
* @description Dify索引方式(high_quality/economy)
|
||||
*/
|
||||
private String difyIndexingTechnique;
|
||||
|
||||
/**
|
||||
* @description 向量模型名称
|
||||
*/
|
||||
private String embeddingModel;
|
||||
|
||||
/**
|
||||
* @description 向量ID(用于向量检索)
|
||||
*/
|
||||
private String vectorID;
|
||||
|
||||
/**
|
||||
* @description 状态(0禁用 1启用)
|
||||
* @description 文档数量
|
||||
*/
|
||||
private Integer documentCount;
|
||||
|
||||
/**
|
||||
* @description 总分段数
|
||||
*/
|
||||
private Integer totalChunks;
|
||||
|
||||
/**
|
||||
* @description 状态(0禁用 1启用 2处理中)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* @description 创建者
|
||||
* @description 创建者(用户ID)
|
||||
*/
|
||||
private String creator;
|
||||
|
||||
/**
|
||||
* @description 创建者部门ID
|
||||
*/
|
||||
private String creatorDept;
|
||||
|
||||
/**
|
||||
* @description 更新者
|
||||
*/
|
||||
@@ -81,6 +116,14 @@ public class TbAiKnowledge extends BaseDTO {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
@@ -137,6 +180,30 @@ public class TbAiKnowledge extends BaseDTO {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public String getDifyDatasetId() {
|
||||
return difyDatasetId;
|
||||
}
|
||||
|
||||
public void setDifyDatasetId(String difyDatasetId) {
|
||||
this.difyDatasetId = difyDatasetId;
|
||||
}
|
||||
|
||||
public String getDifyIndexingTechnique() {
|
||||
return difyIndexingTechnique;
|
||||
}
|
||||
|
||||
public void setDifyIndexingTechnique(String difyIndexingTechnique) {
|
||||
this.difyIndexingTechnique = difyIndexingTechnique;
|
||||
}
|
||||
|
||||
public String getEmbeddingModel() {
|
||||
return embeddingModel;
|
||||
}
|
||||
|
||||
public void setEmbeddingModel(String embeddingModel) {
|
||||
this.embeddingModel = embeddingModel;
|
||||
}
|
||||
|
||||
public String getVectorID() {
|
||||
return vectorID;
|
||||
}
|
||||
@@ -145,6 +212,22 @@ public class TbAiKnowledge extends BaseDTO {
|
||||
this.vectorID = vectorID;
|
||||
}
|
||||
|
||||
public Integer getDocumentCount() {
|
||||
return documentCount;
|
||||
}
|
||||
|
||||
public void setDocumentCount(Integer documentCount) {
|
||||
this.documentCount = documentCount;
|
||||
}
|
||||
|
||||
public Integer getTotalChunks() {
|
||||
return totalChunks;
|
||||
}
|
||||
|
||||
public void setTotalChunks(Integer totalChunks) {
|
||||
this.totalChunks = totalChunks;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
@@ -161,6 +244,14 @@ public class TbAiKnowledge extends BaseDTO {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getCreatorDept() {
|
||||
return creatorDept;
|
||||
}
|
||||
|
||||
public void setCreatorDept(String creatorDept) {
|
||||
this.creatorDept = creatorDept;
|
||||
}
|
||||
|
||||
public String getUpdater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ public class TbAiMessage extends BaseDTO {
|
||||
* @description 角色(user用户 assistant助手 system系统)
|
||||
*/
|
||||
private String role;
|
||||
|
||||
private String agentID;
|
||||
|
||||
/**
|
||||
* @description 消息内容
|
||||
@@ -43,10 +45,30 @@ public class TbAiMessage extends BaseDTO {
|
||||
*/
|
||||
private String knowledgeIDs;
|
||||
|
||||
/**
|
||||
* @description 知识库引用详情(JSON数组,包含title/snippet/score)
|
||||
*/
|
||||
private String knowledgeRefs;
|
||||
|
||||
/**
|
||||
* @description Token数量
|
||||
*/
|
||||
private Integer tokenCount;
|
||||
|
||||
/**
|
||||
* @description Dify消息ID
|
||||
*/
|
||||
private String difyMessageId;
|
||||
|
||||
/**
|
||||
* @description 用户评分(1=好评,-1=差评,0=取消评价)
|
||||
*/
|
||||
private Integer rating;
|
||||
|
||||
/**
|
||||
* @description 用户反馈内容
|
||||
*/
|
||||
private String feedback;
|
||||
|
||||
public String getConversationID() {
|
||||
return conversationID;
|
||||
@@ -64,6 +86,14 @@ public class TbAiMessage extends BaseDTO {
|
||||
this.userID = userID;
|
||||
}
|
||||
|
||||
public String getAgentID() {
|
||||
return agentID;
|
||||
}
|
||||
|
||||
public void setAgentID(String agentID) {
|
||||
this.agentID = agentID;
|
||||
}
|
||||
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
@@ -96,6 +126,14 @@ public class TbAiMessage extends BaseDTO {
|
||||
this.knowledgeIDs = knowledgeIDs;
|
||||
}
|
||||
|
||||
public String getKnowledgeRefs() {
|
||||
return knowledgeRefs;
|
||||
}
|
||||
|
||||
public void setKnowledgeRefs(String knowledgeRefs) {
|
||||
this.knowledgeRefs = knowledgeRefs;
|
||||
}
|
||||
|
||||
public Integer getTokenCount() {
|
||||
return tokenCount;
|
||||
}
|
||||
@@ -104,6 +142,30 @@ public class TbAiMessage extends BaseDTO {
|
||||
this.tokenCount = tokenCount;
|
||||
}
|
||||
|
||||
public String getDifyMessageId() {
|
||||
return difyMessageId;
|
||||
}
|
||||
|
||||
public void setDifyMessageId(String difyMessageId) {
|
||||
this.difyMessageId = difyMessageId;
|
||||
}
|
||||
|
||||
public Integer getRating() {
|
||||
return rating;
|
||||
}
|
||||
|
||||
public void setRating(Integer rating) {
|
||||
this.rating = rating;
|
||||
}
|
||||
|
||||
public String getFeedback() {
|
||||
return feedback;
|
||||
}
|
||||
|
||||
public void setFeedback(String feedback) {
|
||||
this.feedback = feedback;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbAiMessage{" +
|
||||
|
||||
@@ -19,7 +19,12 @@ public class TbAiUploadFile extends BaseDTO {
|
||||
private String userID;
|
||||
|
||||
/**
|
||||
* @description 会话ID
|
||||
* @description 所属知识库ID
|
||||
*/
|
||||
private String knowledgeId;
|
||||
|
||||
/**
|
||||
* @description 关联会话ID(对话中上传)
|
||||
*/
|
||||
private String conversationID;
|
||||
|
||||
@@ -39,7 +44,7 @@ public class TbAiUploadFile extends BaseDTO {
|
||||
private Long fileSize;
|
||||
|
||||
/**
|
||||
* @description 文件类型
|
||||
* @description 文件类型(pdf/txt/docx/md等)
|
||||
*/
|
||||
private String fileType;
|
||||
|
||||
@@ -54,9 +59,29 @@ public class TbAiUploadFile extends BaseDTO {
|
||||
private String extractedText;
|
||||
|
||||
/**
|
||||
* @description 状态(0处理中 1已完成 2失败)
|
||||
* @description Dify文档ID
|
||||
*/
|
||||
private String difyDocumentId;
|
||||
|
||||
/**
|
||||
* @description Dify批次ID
|
||||
*/
|
||||
private String difyBatchId;
|
||||
|
||||
/**
|
||||
* @description 分段数量
|
||||
*/
|
||||
private Integer chunkCount;
|
||||
|
||||
/**
|
||||
* @description 状态(0上传中 1处理中 2已完成 3失败)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* @description 错误信息
|
||||
*/
|
||||
private String errorMessage;
|
||||
|
||||
public String getUserID() {
|
||||
return userID;
|
||||
@@ -66,6 +91,14 @@ public class TbAiUploadFile extends BaseDTO {
|
||||
this.userID = userID;
|
||||
}
|
||||
|
||||
public String getKnowledgeId() {
|
||||
return knowledgeId;
|
||||
}
|
||||
|
||||
public void setKnowledgeId(String knowledgeId) {
|
||||
this.knowledgeId = knowledgeId;
|
||||
}
|
||||
|
||||
public String getConversationID() {
|
||||
return conversationID;
|
||||
}
|
||||
@@ -122,6 +155,30 @@ public class TbAiUploadFile extends BaseDTO {
|
||||
this.extractedText = extractedText;
|
||||
}
|
||||
|
||||
public String getDifyDocumentId() {
|
||||
return difyDocumentId;
|
||||
}
|
||||
|
||||
public void setDifyDocumentId(String difyDocumentId) {
|
||||
this.difyDocumentId = difyDocumentId;
|
||||
}
|
||||
|
||||
public String getDifyBatchId() {
|
||||
return difyBatchId;
|
||||
}
|
||||
|
||||
public void setDifyBatchId(String difyBatchId) {
|
||||
this.difyBatchId = difyBatchId;
|
||||
}
|
||||
|
||||
public Integer getChunkCount() {
|
||||
return chunkCount;
|
||||
}
|
||||
|
||||
public void setChunkCount(Integer chunkCount) {
|
||||
this.chunkCount = chunkCount;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
@@ -130,6 +187,14 @@ public class TbAiUploadFile extends BaseDTO {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbAiUploadFile{" +
|
||||
|
||||
@@ -19,6 +19,11 @@ public class TbAiUsageStatistics extends BaseDTO {
|
||||
*/
|
||||
private String userID;
|
||||
|
||||
/**
|
||||
* @description 智能体ID(为空表示全局统计)
|
||||
*/
|
||||
private String agentID;
|
||||
|
||||
/**
|
||||
* @description 统计日期
|
||||
*/
|
||||
@@ -43,6 +48,11 @@ public class TbAiUsageStatistics extends BaseDTO {
|
||||
* @description 上传文件数
|
||||
*/
|
||||
private Integer fileCount;
|
||||
|
||||
/**
|
||||
* @description 知识库查询次数
|
||||
*/
|
||||
private Integer knowledgeQueryCount;
|
||||
|
||||
public String getUserID() {
|
||||
return userID;
|
||||
@@ -52,6 +62,14 @@ public class TbAiUsageStatistics extends BaseDTO {
|
||||
this.userID = userID;
|
||||
}
|
||||
|
||||
public String getAgentID() {
|
||||
return agentID;
|
||||
}
|
||||
|
||||
public void setAgentID(String agentID) {
|
||||
this.agentID = agentID;
|
||||
}
|
||||
|
||||
public Date getStatDate() {
|
||||
return statDate;
|
||||
}
|
||||
@@ -92,6 +110,14 @@ public class TbAiUsageStatistics extends BaseDTO {
|
||||
this.fileCount = fileCount;
|
||||
}
|
||||
|
||||
public Integer getKnowledgeQueryCount() {
|
||||
return knowledgeQueryCount;
|
||||
}
|
||||
|
||||
public void setKnowledgeQueryCount(Integer knowledgeQueryCount) {
|
||||
this.knowledgeQueryCount = knowledgeQueryCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbAiUsageStatistics{" +
|
||||
|
||||
Reference in New Issue
Block a user