27 lines
687 B
Go
27 lines
687 B
Go
package dto
|
|
|
|
import (
|
|
"rag-local/kb/model/entity"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
type ListMessageReq struct {
|
|
g.Meta `path:"/list" method:"get" tags:"消息" summary:"历史消息"`
|
|
ConversationId int64 `v:"required" json:"conversation_id"`
|
|
}
|
|
|
|
type ListMessageRes struct {
|
|
List []*entity.Message `json:"list"`
|
|
}
|
|
|
|
// ChatReq RAG 问答(SSE 流式响应,非标准 JSON 包装)
|
|
type ChatReq struct {
|
|
g.Meta `path:"/chat" method:"post" tags:"消息" summary:"RAG 问答(SSE 流式)"`
|
|
ConversationId int64 `json:"conversation_id"`
|
|
DatasetId int64 `json:"dataset_id"`
|
|
Question string `v:"required" json:"question"`
|
|
}
|
|
|
|
type ChatRes struct{}
|