xunji_service.api 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. XunjiID *uint64 `json:"configId,optional"`
  40. }
  41. // XunjiService information response | XunjiService信息返回体
  42. XunjiServiceInfoResp {
  43. BaseDataInfo
  44. // XunjiService information | XunjiService数据
  45. Data XunjiServiceInfo `json:"data"`
  46. }
  47. )
  48. @server(
  49. jwt: Auth
  50. group: xunji_service
  51. middleware: Authority
  52. )
  53. service Wechat {
  54. // Create xunji service information | 创建XunjiService
  55. @handler createXunjiService
  56. post /xunji_service/create (XunjiServiceInfo) returns (BaseMsgResp)
  57. // Update xunji service information | 更新XunjiService
  58. @handler updateXunjiService
  59. post /xunji_service/update (XunjiServiceInfo) returns (BaseMsgResp)
  60. // Delete xunji service information | 删除XunjiService信息
  61. @handler deleteXunjiService
  62. post /xunji_service/delete (IDsReq) returns (BaseMsgResp)
  63. // Get xunji service list | 获取XunjiService列表
  64. @handler getXunjiServiceList
  65. post /xunji_service/list (XunjiServiceListReq) returns (XunjiServiceListResp)
  66. // Get xunji service by ID | 通过ID获取XunjiService
  67. @handler getXunjiServiceById
  68. post /xunji_service (IDReq) returns (XunjiServiceInfoResp)
  69. }