12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package v1
- import (
- "github.com/gogf/gf/v2/frame/g"
- )
- // ChatHistoryReq 历史记录
- type ChatHistoryReq struct {
- g.Meta `path:"/chatHistory" tags:"AiChat" method:"post" summary:"查询聊天历史记录"`
- PageSize int `json:"pageSize" v:"between:1,20" dc:"每页数据量"`
- PageNum int `json:"pageNum" v:"between:0,20" dc:"页码,从0开始"`
- PrevId string `json:"prevId" dc:"当前记录id"`
- }
- type History struct {
- Id string `json:"id" dc:"信息加密id"`
- Content string `json:"content" dc:"内容"`
- Type int `json:"type" dc:"1:用户提问 2:智能助手回复"`
- Useful int `json:"useful" dc:"1:有用 -1:无用 0:暂无评价"`
- CreateTime int64 `json:"create_time" dc:"聊天时间"`
- }
- type ChatHistoryRes struct {
- Data []History `json:"data"`
- ErrorMsg string `json:"error_msg"`
- ErrorCode int64 `json:"error_code"`
- }
- // EvaluateReq 评价
- type EvaluateReq struct {
- g.Meta `path:"/evaluate" tags:"AiChat" method:"post" summary:"评价回复的问题"`
- MessageId string `json:"messageId" v:"required"`
- Evaluate int `json:"evaluate" v:"in:-1,1" dc:"-1:没用;1:有用"`
- }
- type EvaluateRes struct {
- ErrorMsg string `json:"error_msg"`
- ErrorCode int64 `json:"error_code"`
- Data bool `json:"data" dc:"true:成功 false:失败"`
- }
- type QuestionRes struct {
- ErrorMsg string `json:"error_msg"`
- ErrorCode int64 `json:"error_code"`
- Data []string `json:"data" dc:"true:成功 false:失败"`
- }
- // UsuallyProblemReq 常见问题
- type UsuallyProblemReq struct {
- g.Meta `path:"/usuallyProblem" tags:"AiChat" method:"post" summary:"获取场景下的常见问题"`
- Href string `json:"href" v:"url"`
- }
|