feat: 新增账号编码和HTTP连接功能
This commit is contained in:
63
model/dto/session_tool_dto.go
Normal file
63
model/dto/session_tool_dto.go
Normal file
@@ -0,0 +1,63 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// RagListDatasetReq 数据集列表请求
|
||||
type RagListDatasetReq struct {
|
||||
Ids []int64 `json:"ids" dc:"数据集ID列表"`
|
||||
}
|
||||
|
||||
// RagListDatasetRes 数据集列表响应
|
||||
type RagListDatasetRes struct {
|
||||
List []*RagDatasetVO `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
type RagDatasetVO struct {
|
||||
Id int64 `json:"id,string" dc:"id"`
|
||||
Name string `json:"name" dc:"数据集名称"`
|
||||
Description string `json:"description" dc:"数据集描述"`
|
||||
}
|
||||
|
||||
// RagQueryReq RAG查询请求
|
||||
type RagQueryReq struct {
|
||||
g.Meta `path:"/ragQuery" method:"post" tags:"RAG查询" summary:"执行RAG查询" dc:"执行RAG查询"`
|
||||
|
||||
Content string `json:"content" v:"required#查询内容不能为空" dc:"用户问题"`
|
||||
DatasetIds []int64 `json:"datasetIds" dc:"数据集ID"`
|
||||
History []*Message `json:"history" dc:"历史对话"`
|
||||
TopK int `json:"topK" d:"5" dc:"检索topK,默认5"`
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
Role string `json:"role"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
// RagQueryRes RAG查询响应
|
||||
type RagQueryRes struct {
|
||||
Answer string `json:"answer" dc:"生成的答案"`
|
||||
}
|
||||
|
||||
type RAGListKeywordReq struct {
|
||||
Words []string `json:"words"`
|
||||
}
|
||||
|
||||
// RAGListKeywordRes 关键词列表响应
|
||||
type RAGListKeywordRes struct {
|
||||
List []*RAGKeywordVO `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
type RAGKeywordVO struct {
|
||||
Id int64 `json:"id,string" dc:"id"`
|
||||
Word string `json:"word" dc:"关键词名称"`
|
||||
Weight int16 `json:"weight" dc:"权重"`
|
||||
DatasetId int64 `json:"datasetId,string" dc:"数据集ID"`
|
||||
DocumentId int64 `json:"documentId,string" dc:"文档ID"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
Reference in New Issue
Block a user