Browse Source

[Mod 0000]AI对话接口添加token

wangkeyi 3 days ago
parent
commit
84e3821bd2
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/views/ventAI/manageAssistent/api.ts

+ 3 - 0
src/views/ventAI/manageAssistent/api.ts

@@ -1,4 +1,5 @@
 import { defHttp } from '/@/utils/http/axios';
+import { getToken } from '/@/utils/auth';
 
 enum Api {
   unified = '/ventAI/api/chat',
@@ -50,6 +51,7 @@ export const unifiedStream = async (
     const response = await fetch(Api.unified, {
       method: 'POST',
       body: formData,
+      headers: { 'X-Access-Token': getToken() },
     });
 
     if (!response.ok) {
@@ -130,6 +132,7 @@ export const reviewPdfStream = async (
     const response = await fetch(Api.reviewPdf, {
       method: 'POST',
       body: formData,
+      headers: { 'X-Access-Token': getToken() },
     });
 
     if (!response.ok) {