Add omeToken

This commit is contained in:
Ted
2025-02-18 14:26:20 +08:00
parent b966107117
commit 3754160407
4 changed files with 39 additions and 13 deletions

View File

@@ -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;
}