You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.0 KiB

4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
  1. import request from "../utils/request";
  2. const APIurl = import.meta.env.VITE_APP_API_BASE_URL;
  3. const MJAPIurl = import.meta.env.VITE_APP_MJ_API_BASE_URL;
  4. // 工作流获取用户意图接口
  5. export const getReplyAPI = function (params) {
  6. return fetch("https://api.coze.cn/v1/workflow/run", {
  7. method: "POST",
  8. body: JSON.stringify({
  9. workflow_id: "7512677411467001910",
  10. parameters: params,
  11. }),
  12. headers: {
  13. "Content-Type": "application/json",
  14. Authorization:
  15. "Bearer pat_cOhJRgrEpjXwJJLW1N3YNjCxy19HYTpMFY6XlNCLi4ogm5tdfV266gWIB7MeaRIU",
  16. },
  17. });
  18. };
  19. // 获取第二个工作流给出的结论
  20. export const getConclusionAPI = function (params) {
  21. return fetch("https://api.coze.cn/v1/workflow/run", {
  22. method: "POST",
  23. body: JSON.stringify({
  24. workflow_id: "7509384582975897650",
  25. parameters: params,
  26. }),
  27. headers: {
  28. "Content-Type": "application/json",
  29. Authorization:
  30. "Bearer pat_cOhJRgrEpjXwJJLW1N3YNjCxy19HYTpMFY6XlNCLi4ogm5tdfV266gWIB7MeaRIU",
  31. },
  32. });
  33. };