aiSearchApi.go 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package v1
  2. import "github.com/gogf/gf/v2/frame/g"
  3. type CreateNewSessionReq struct {
  4. g.Meta `path:"/session/newCreate" tags:"AiSearch" method:"get" summary:"创建新会话"`
  5. }
  6. type CreateNewSessionRes struct {
  7. ErrorCode int `dc:"状态码"`
  8. ErrorMsg string `dc:"错误信息"`
  9. Data interface{} `dc:"返回数据"`
  10. }
  11. type LikeAnswerReq struct {
  12. g.Meta `path:"/answer/like" tags:"AiSearch" method:"post" summary:"回复点赞"`
  13. Cid string `json:"cid" dc:"聊天id"`
  14. Val int `json:"val" dc:"点赞:0:未点赞 1:已点赞"`
  15. }
  16. type LikeAnswerRes struct {
  17. ErrorCode int `dc:"状态码"`
  18. ErrorMsg string `dc:"错误信息"`
  19. Data interface{} `dc:"返回数据"`
  20. }
  21. type HistorySsListReq struct {
  22. g.Meta `path:"/session/history/list" tags:"AiSearch" method:"get" summary:"历史会话列表"`
  23. }
  24. type HistorySsListRes struct {
  25. ErrorCode int `dc:"状态码"`
  26. ErrorMsg string `dc:"错误信息"`
  27. Data interface{} `dc:"返回数据"`
  28. }
  29. type SessionDetailReq struct {
  30. g.Meta `path:"/session/detail" tags:"AiSearch" method:"post" summary:"会话详情"`
  31. Sid string `json:"sid" dc:"当前会话id"`
  32. }
  33. type SessionDetailRes struct {
  34. ErrorCode int `dc:"状态码"`
  35. ErrorMsg string `dc:"错误信息"`
  36. Data interface{} `dc:"返回数据"`
  37. }
  38. type ProblemConfigurationReq struct {
  39. g.Meta `path:"/problem/configuration" tags:"AiSearch" method:"post" summary:"问题配置"`
  40. }
  41. type ProblemConfigurationRes struct {
  42. ErrorCode int `dc:"状态码"`
  43. ErrorMsg string `dc:"错误信息"`
  44. Data interface{} `dc:"返回数据"`
  45. }
  46. type ChatReq struct {
  47. g.Meta `path:"/chat" tags:"AiSearch" method:"post" summary:"聊天"`
  48. SId int `json:"sId" v:"required" dc:"当前会话id"`
  49. Content string `json:"content" v:"required" dc:"用户发送内容"`
  50. }
  51. type ChatRes struct {
  52. ErrorCode int `dc:"状态码"`
  53. ErrorMsg string `dc:"错误信息"`
  54. Data interface{} `dc:"返回数据"`
  55. }
  56. type BiddingListReq struct {
  57. g.Meta `path:"/bidding/List" tags:"AiSearch" method:"post" summary:"报讯列表"`
  58. ChatId string `json:"chatId" dc:"聊天Id"`
  59. }
  60. type BiddingListRes struct {
  61. ErrorCode int `dc:"状态码"`
  62. ErrorMsg string `dc:"错误信息"`
  63. Data interface{} `dc:"返回数据"`
  64. }