1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- 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:暂无评价"`
- Actions int `json:"actions" dc:"是否有功能按钮 1:有 0:没有"`
- CreateTime int64 `json:"create_time" dc:"聊天时间"`
- }
- type ChatHistoryRes struct {
- Data struct {
- HasMore bool `json:"hasMore" dc:"是否有下一页"`
- List []History `json:"list" dc:"聊天历史"`
- } `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"`
- }
|