byt-lingxiao-ai 0.3.11 → 0.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -62,12 +62,15 @@ export default {
62
62
  // 重置解析器
63
63
  this.streamParser.reset();
64
64
 
65
+ const controller = new AbortController();
66
+
65
67
  try {
66
68
  const startTime = Date.now();
67
69
  const token = getCookie('bonyear-access_token') || `44e7f112-63f3-429d-908d-2c97ec380de2`;
68
70
 
69
71
  const response = await fetch(API_URL, {
70
72
  method: 'POST',
73
+ signal: controller.signal,
71
74
  headers: {
72
75
  'Content-Type': 'application/json',
73
76
  'Authorization': `Bearer ${token}`,
@@ -31613,11 +31613,13 @@ const getCookie = cname => {
31613
31613
 
31614
31614
  // 重置解析器
31615
31615
  this.streamParser.reset();
31616
+ const controller = new AbortController();
31616
31617
  try {
31617
31618
  const startTime = Date.now();
31618
31619
  const token = getCookie('bonyear-access_token') || `44e7f112-63f3-429d-908d-2c97ec380de2`;
31619
31620
  const response = await fetch(API_URL, {
31620
31621
  method: 'POST',
31622
+ signal: controller.signal,
31621
31623
  headers: {
31622
31624
  'Content-Type': 'application/json',
31623
31625
  'Authorization': `Bearer ${token}`