We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7a6161a + f3f2c62 commit 73b17afCopy full SHA for 73b17af
1 file changed
src/components/assistant/util.ts
@@ -1,3 +1,4 @@
1
+import Cookies from 'js-cookie'
2
// API请求选项接口
3
export interface ChatApiOptions {
4
model: string
@@ -254,7 +255,9 @@ export async function sendStreamChatRequest(
254
255
const response = await fetch(SERVER_MODEL_API_URL, {
256
method: 'POST',
257
headers: {
- 'Content-Type': 'application/json'
258
+ 'Content-Type': 'application/json',
259
+ Authorization: Cookies.get('bizy_token') || '',
260
+ ...(options as any)?.headers
261
},
262
body: JSON.stringify(requestBody),
263
signal: abortController.signal // 添加中止信号
0 commit comments