xunji_service.api 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. import "../base.api"
  2. import "./agent.api"
  3. type (
  4. // The data of xunji service information | XunjiService信息
  5. XunjiServiceInfo {
  6. BaseIDInfo
  7. // Status 1: normal 2: ban | 状态 1 正常 2 禁用
  8. Status *uint8 `json:"status,optional"`
  9. // Xunji表ID
  10. XunjiId *uint64 `json:"xunjiId,optional"`
  11. // 智能体ID
  12. AgentId *uint64 `json:"agentId,optional"`
  13. // 模式信息
  14. AgentInfo *AgentInfo `json:"agentInfo,optional"`
  15. // organization_id | 租户ID
  16. OrganizationId *uint64 `json:"organizationId,optional"`
  17. // 微信ID
  18. Wxid *string `json:"wxid,optional"`
  19. // 大模型服务地址
  20. ApiBase *string `json:"apiBase,optional"`
  21. // 大模型服务密钥
  22. ApiKey *string `json:"apiKey,optional"`
  23. }
  24. // The response data of xunji service list | XunjiService列表数据
  25. XunjiServiceListResp {
  26. BaseDataInfo
  27. // XunjiService list data | XunjiService列表数据
  28. Data XunjiServiceListInfo `json:"data"`
  29. }
  30. // XunjiService list data | XunjiService列表数据
  31. XunjiServiceListInfo {
  32. BaseListInfo
  33. // The API list data | XunjiService列表数据
  34. Data []XunjiServiceInfo `json:"data"`
  35. }
  36. // Get xunji service list request params | XunjiService列表请求参数
  37. XunjiServiceListReq {
  38. PageInfo
  39. // 微信ID
  40. Wxid *string `json:"wxid,optional"`
  41. // 大模型服务地址
  42. ApiBase *string `json:"apiBase,optional"`
  43. // 大模型服务密钥
  44. ApiKey *string `json:"apiKey,optional"`
  45. }
  46. // XunjiService information response | XunjiService信息返回体
  47. XunjiServiceInfoResp {
  48. BaseDataInfo
  49. // XunjiService information | XunjiService数据
  50. Data XunjiServiceInfo `json:"data"`
  51. }
  52. )
  53. @server(
  54. jwt: Auth
  55. group: xunji_service
  56. middleware: Authority
  57. )
  58. service Wechat {
  59. // Create xunji service information | 创建XunjiService
  60. @handler createXunjiService
  61. post /xunji_service/create (XunjiServiceInfo) returns (BaseMsgResp)
  62. // Update xunji service information | 更新XunjiService
  63. @handler updateXunjiService
  64. post /xunji_service/update (XunjiServiceInfo) returns (BaseMsgResp)
  65. // Delete xunji service information | 删除XunjiService信息
  66. @handler deleteXunjiService
  67. post /xunji_service/delete (IDsReq) returns (BaseMsgResp)
  68. // Get xunji service list | 获取XunjiService列表
  69. @handler getXunjiServiceList
  70. post /xunji_service/list (XunjiServiceListReq) returns (XunjiServiceListResp)
  71. // Get xunji service by ID | 通过ID获取XunjiService
  72. @handler getXunjiServiceById
  73. post /xunji_service (IDReq) returns (XunjiServiceInfoResp)
  74. }