mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-15 21:43:45 +08:00
Add omeToken
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
ModelType,
|
||||
useAccessStore,
|
||||
useChatStore,
|
||||
useAppConfig,
|
||||
} from "../store";
|
||||
import { ChatGPTApi, DalleRequestPayload } from "./platforms/openai";
|
||||
import { GeminiProApi } from "./platforms/google";
|
||||
@@ -233,6 +234,7 @@ export function validString(x: string): boolean {
|
||||
}
|
||||
|
||||
export function getHeaders(ignoreHeaders: boolean = false) {
|
||||
const appConfig = useAppConfig.getState();
|
||||
const accessStore = useAccessStore.getState();
|
||||
const chatStore = useChatStore.getState();
|
||||
let headers: Record<string, string> = {};
|
||||
@@ -348,6 +350,8 @@ export function getHeaders(ignoreHeaders: boolean = false) {
|
||||
);
|
||||
}
|
||||
|
||||
headers["OME-METIS-Authorization"] = appConfig.omeToken || "";
|
||||
|
||||
return headers;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user