|
|
@@ -63,6 +63,8 @@ export class BigModelApi implements LLMApi {
|
|
|
options.onController?.(controller);
|
|
|
|
|
|
try {
|
|
|
+ const userInfo = localStorage.getItem('userInfo');
|
|
|
+ const token = userInfo ? JSON.parse(userInfo).token : "";
|
|
|
const chatPath = this.apiPath;
|
|
|
const chatPayload = {
|
|
|
method: "POST",
|
|
|
@@ -70,6 +72,7 @@ export class BigModelApi implements LLMApi {
|
|
|
signal: controller.signal,
|
|
|
headers: {
|
|
|
'Content-Type': 'application/json',
|
|
|
+ 'Authorization': token
|
|
|
},
|
|
|
};
|
|
|
|
|
|
@@ -258,4 +261,4 @@ export class BigModelApi implements LLMApi {
|
|
|
async models(): Promise<LLMModel[]> {
|
|
|
return [];
|
|
|
}
|
|
|
-}
|
|
|
+}
|