Skip to content

Commit 73b17af

Browse files
committed
Merge branch 'master' into fix/image_upload_support_video
2 parents 7a6161a + f3f2c62 commit 73b17af

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/components/assistant/util.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Cookies from 'js-cookie'
12
// API请求选项接口
23
export interface ChatApiOptions {
34
model: string
@@ -254,7 +255,9 @@ export async function sendStreamChatRequest(
254255
const response = await fetch(SERVER_MODEL_API_URL, {
255256
method: 'POST',
256257
headers: {
257-
'Content-Type': 'application/json'
258+
'Content-Type': 'application/json',
259+
Authorization: Cookies.get('bizy_token') || '',
260+
...(options as any)?.headers
258261
},
259262
body: JSON.stringify(requestBody),
260263
signal: abortController.signal // 添加中止信号

0 commit comments

Comments
 (0)