aiSearchApi.go 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 string `json:"sId" v:"required" dc:"当前会话id"`
  49. Question string `json:"question" v:"required" dc:"用户发送内容"`
  50. Item int `json:"item" v:"required" dc:"分类"`
  51. }
  52. type ChatRes struct {
  53. Status int `json:"status" dc:"状态;0:服务器繁忙 1:成功"`
  54. Count int `json:"count" dc:"列表长度"`
  55. List []*ResBidding `json:"list" dc:"答案列表"`
  56. }
  57. type BiddingListReq struct {
  58. g.Meta `path:"/bidding/List" tags:"AiSearch" method:"post" summary:"报讯列表"`
  59. ChatId string `json:"chatId" dc:"聊天Id"`
  60. }
  61. type BiddingListRes struct {
  62. ErrorCode int `dc:"状态码"`
  63. ErrorMsg string `dc:"错误信息"`
  64. Data interface{} `dc:"返回数据"`
  65. }
  66. type ResBidding struct {
  67. InfoId string `json:"infoId" dc:"标讯id"`
  68. Title string `json:"title" dc:"标题"`
  69. Area string `json:"area" dc:"省份"`
  70. City string `json:"city" dc:"城市"`
  71. District string `json:"district" dc:"区县"`
  72. Subtype string `json:"subtype" dc:"信息类型"`
  73. Industry string `json:"industry" dc:"信息行业"`
  74. Annex int `json:"annex" dc:"是否有附件;0:否 1:是"`
  75. Buyerclass string `json:"buyerclass" dc:"采购单位行业"`
  76. Budget int64 `json:"budget" dc:"预算"`
  77. Bidamount int64 `json:"bidamount" dc:"中标金额"`
  78. Publishtime int64 `json:"publishtime" dc:"发布时间"`
  79. Collect int `json:"collect" dc:"是否收藏;0:否 1:是"`
  80. }