aiSearchApi.go 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 `json:"errorCode" dc:"状态码"`
  8. ErrorMsg string `json:"errorMsg" dc:"错误信息"`
  9. Data interface{} `json:"data" 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 LikeSessionRes struct {
  22. ErrorCode int `json:"errorCode" dc:"状态码"`
  23. ErrorMsg string `json:"errorMsg" dc:"错误信息"`
  24. Data interface{} `json:"data" dc:"返回数据"`
  25. }
  26. type HistorySsListReq struct {
  27. g.Meta `path:"/session/history/list" tags:"AiSearch" method:"get" summary:"历史会话列表"`
  28. }
  29. type HistorySsListRes struct {
  30. ErrorCode int `json:"errorCode" dc:"状态码"`
  31. ErrorMsg string `json:"errorMsg" dc:"错误信息"`
  32. Data interface{} `json:"data" dc:"返回数据"`
  33. }
  34. type SessionDetailReq struct {
  35. g.Meta `path:"/session/detail" tags:"AiSearch" method:"post" summary:"会话详情"`
  36. Sid string `json:"sid" dc:"当前会话id"`
  37. }
  38. type SessionDetailRes struct {
  39. ErrorCode int `json:"errorCode" dc:"状态码"`
  40. ErrorMsg string `json:"errorMsg" dc:"错误信息"`
  41. Data interface{} `json:"data" dc:"返回数据"`
  42. }
  43. type ProblemConfigurationReq struct {
  44. g.Meta `path:"/problem/configuration" tags:"AiSearch" method:"post" summary:"问题配置"`
  45. }
  46. type ProblemConfigurationRes struct {
  47. ErrorCode int `json:"errorCode" dc:"状态码"`
  48. ErrorMsg string `json:"errorMsg" dc:"错误信息"`
  49. Data interface{} `json:"data" dc:"返回数据"`
  50. }
  51. type ChatReq struct {
  52. g.Meta `path:"/chat" tags:"AiSearch" method:"post" summary:"聊天"`
  53. SId string `json:"sId" v:"required" dc:"当前会话id"`
  54. Question string `json:"question" v:"required" dc:"用户发送内容"`
  55. Item int `json:"item" v:"required" dc:"分类"`
  56. }
  57. type ChatRes struct {
  58. Id string `json:"id" dc:"id"`
  59. Status int `json:"status" dc:"状态;0:服务器繁忙 1:成功"`
  60. Count int `json:"count" dc:"列表长度"`
  61. List []*ResBidding `json:"list" dc:"答案列表"`
  62. LargeModelName string `json:"largeModelName" dc:"大模型名称"`
  63. LargeModelReply map[string]interface{} `json:"largeModelReply" dc:"大模型回复"`
  64. }
  65. type BiddingListReq struct {
  66. g.Meta `path:"/bidding/List" tags:"AiSearch" method:"post" summary:"报讯列表"`
  67. ChatId string `json:"chatId" dc:"聊天Id"`
  68. }
  69. type BiddingListRes struct {
  70. ErrorCode int `json:"errorCode" dc:"状态码"`
  71. ErrorMsg string `json:"errorMsg" dc:"错误信息"`
  72. Data interface{} `json:"data" dc:"返回数据"`
  73. }
  74. type ResBidding struct {
  75. InfoId string `json:"infoId" dc:"标讯id"`
  76. Title string `json:"title" dc:"标题"`
  77. Area string `json:"area" dc:"省份"`
  78. City string `json:"city" dc:"城市"`
  79. District string `json:"district" dc:"区县"`
  80. Subtype string `json:"subtype" dc:"信息类型"`
  81. Industry string `json:"industry" dc:"信息行业"`
  82. Annex int `json:"annex" dc:"是否有附件;0:否 1:是"`
  83. Buyerclass string `json:"buyerclass" dc:"采购单位行业"`
  84. Budget int64 `json:"budget" dc:"预算"`
  85. Bidamount int64 `json:"bidamount" dc:"中标金额"`
  86. Publishtime int64 `json:"publishtime" dc:"发布时间"`
  87. Collect int `json:"collect" dc:"是否收藏;0:否 1:是"`
  88. }