|
|
@@ -1,4 +1,5 @@
|
|
|
import type { SSERawEvent } from './types';
|
|
|
+import { getToken } from '/@/utils/auth';
|
|
|
|
|
|
enum Api {
|
|
|
clickTun = '/ventAI/api/interpret/click/tun',
|
|
|
@@ -39,7 +40,10 @@ async function ssePost(
|
|
|
): Promise<{ thread_id: string; session_id: string }> {
|
|
|
const response = await fetch(url, {
|
|
|
method: 'POST',
|
|
|
- headers: { 'Content-Type': 'application/json' },
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ 'X-Access-Token': getToken(),
|
|
|
+ },
|
|
|
body: JSON.stringify(body),
|
|
|
});
|
|
|
|