aiSearchApi.go 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. package v1
  2. import (
  3. "github.com/gogf/gf/v2/frame/g"
  4. "github.com/gogf/gf/v2/os/gtime"
  5. )
  6. type CreateNewSessionReq struct {
  7. g.Meta `path:"/session/newCreate" tags:"AiSearch" method:"get" summary:"创建新会话"`
  8. }
  9. type CreateNewSessionRes struct {
  10. ErrorCode int `json:"errorCode" dc:"状态码"`
  11. ErrorMsg string `json:"errorMsg" dc:"错误信息"`
  12. Data interface{} `json:"data" dc:"返回数据"`
  13. }
  14. type LikeAnswerReq struct {
  15. g.Meta `path:"/answer/like" tags:"AiSearch" method:"post" summary:"回复点赞"`
  16. Cid string `json:"cid" dc:"聊天id"`
  17. Val int `json:"val" dc:"点赞:0:未点赞 1:已点赞"`
  18. }
  19. type LikeAnswerRes struct {
  20. ErrorCode int `dc:"状态码"`
  21. ErrorMsg string `dc:"错误信息"`
  22. Data interface{} `dc:"返回数据"`
  23. }
  24. type LikeSessionRes struct {
  25. ErrorCode int `json:"errorCode" dc:"状态码"`
  26. ErrorMsg string `json:"errorMsg" dc:"错误信息"`
  27. Data interface{} `json:"data" dc:"返回数据"`
  28. }
  29. type HistorySsListReq struct {
  30. g.Meta `path:"/session/history/list" tags:"AiSearch" method:"get" summary:"历史会话列表"`
  31. }
  32. type HistorySsListRes struct {
  33. ErrorCode int `json:"errorCode" dc:"状态码"`
  34. ErrorMsg string `json:"errorMsg" dc:"错误信息"`
  35. Data interface{} `json:"data" dc:"返回数据"`
  36. }
  37. type SessionDetailReq struct {
  38. g.Meta `path:"/session/detail" tags:"AiSearch" method:"post" summary:"会话详情"`
  39. Sid string `json:"sid" dc:"当前会话id"`
  40. }
  41. type SessionDetailRes struct {
  42. Data []*SsDetailList `json:"data" dc:"返回数据"`
  43. }
  44. type SsDetailList struct {
  45. Id string `json:"id" dc:"问题id"`
  46. Question string `json:"question"`
  47. Answer *ChatRes `json:"answer" dc:"答案列表"`
  48. Like int `json:"like" dc:"点赞状态"`
  49. Collect int `json:"collect" dc:"收藏状态"`
  50. CreateTime gtime.Time `json:"create_time"`
  51. }
  52. type ProblemConfigurationReq struct {
  53. g.Meta `path:"/problem/configuration" tags:"AiSearch" method:"post" summary:"问题配置"`
  54. }
  55. type ProblemConfigurationRes struct {
  56. Data interface{} `json:"data" dc:"返回数据"`
  57. }
  58. type ChatReq struct {
  59. g.Meta `path:"/chat" tags:"AiSearch" method:"post" summary:"聊天"`
  60. SId string `json:"sId" v:"required" dc:"当前会话id"`
  61. Question string `json:"question" v:"required" dc:"用户发送内容"`
  62. Item int `json:"item" v:"required" dc:"分类"`
  63. }
  64. type ChatRes struct {
  65. Id string `json:"id" dc:"id"`
  66. Status int `json:"status" dc:"状态;0:服务器繁忙 1:成功"`
  67. Count int `json:"count" dc:"列表长度"`
  68. List []*ResBidding `json:"list" dc:"答案列表"`
  69. LargeModelName string `json:"largeModelName" dc:"大模型名称"`
  70. LargeModelReply map[string]interface{} `json:"largeModelReply" dc:"大模型回复"`
  71. }
  72. type BiddingListReq struct {
  73. g.Meta `path:"/bidding/List" tags:"AiSearch" method:"post" summary:"报讯列表"`
  74. ChatId string `json:"chatId" dc:"聊天Id"`
  75. }
  76. type BiddingListRes struct {
  77. Data []ResBidding `json:"data" dc:"返回数据"`
  78. }
  79. type ResBidding struct {
  80. InfoId string `json:"infoId" dc:"标讯id"`
  81. Title string `json:"title" dc:"标题"`
  82. Area string `json:"area" dc:"省份"`
  83. City string `json:"city" dc:"城市"`
  84. District string `json:"district" dc:"区县"`
  85. Subtype string `json:"subtype" dc:"信息类型"`
  86. Industry string `json:"industry" dc:"信息行业"`
  87. Annex int `json:"annex" dc:"是否有附件;0:否 1:是"`
  88. Buyerclass string `json:"buyerclass" dc:"采购单位行业"`
  89. Budget int64 `json:"budget" dc:"预算"`
  90. Bidamount int64 `json:"bidamount" dc:"中标金额"`
  91. Publishtime int64 `json:"publishtime" dc:"发布时间"`
  92. Collect int `json:"collect" dc:"是否收藏;0:否 1:是"`
  93. }