request.go 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package dialog
  2. // AccessTokenRequest 获取 access token 请求.
  3. // 官方文档: https://developers.weixin.qq.com/doc/aispeech/confapi/dialog/token.html
  4. type AccessTokenRequest struct {
  5. Account string `json:"account,omitempty"`
  6. }
  7. // ImportJSONRequest 简单问答导入请求.
  8. // 官方文档: https://developers.weixin.qq.com/doc/aispeech/confapi/dialog/bot/import.html
  9. type ImportJSONRequest struct {
  10. Mode int `json:"mode"`
  11. Data []BotIntent `json:"data"`
  12. }
  13. // BotIntent 简单问答意图.
  14. type BotIntent struct {
  15. Skill string `json:"skill"`
  16. Intent string `json:"intent"`
  17. Threshold string `json:"threshold,omitempty"`
  18. Disable bool `json:"disable"`
  19. Questions []string `json:"questions"`
  20. Answers []string `json:"answers"`
  21. }
  22. // EffectiveProgressRequest 发布进度查询请求.
  23. // 官方文档: https://developers.weixin.qq.com/doc/aispeech/confapi/dialog/bot/progress.html
  24. type EffectiveProgressRequest struct {
  25. Env string `json:"env"`
  26. }
  27. // FetchAsyncRequest 异步任务查询请求.
  28. // 官方文档: https://developers.weixin.qq.com/doc/aispeech/confapi/dialog/bot/fetch.html
  29. type FetchAsyncRequest struct {
  30. TaskID string `json:"task_id"`
  31. }
  32. // QueryRequest 调用智能对话请求.
  33. // 官方文档: https://developers.weixin.qq.com/doc/aispeech/confapi/dialog/bot/query.html
  34. type QueryRequest struct {
  35. Query string `json:"query"`
  36. Env string `json:"env,omitempty"`
  37. FirstPrioritySkills []string `json:"first_priority_skills,omitempty"`
  38. SecondPrioritySkills []string `json:"second_priority_skills,omitempty"`
  39. UserName string `json:"user_name,omitempty"`
  40. Avatar string `json:"avatar,omitempty"`
  41. UserID string `json:"userid,omitempty"`
  42. }