Skip to content

Commit b0d7697

Browse files
committed
bizybot请求添加Authorization
1 parent fb8d0cc commit b0d7697

2 files changed

Lines changed: 5 additions & 2 deletions

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 // 添加中止信号

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.13
1+
1.2.14

0 commit comments

Comments
 (0)