fix: transcription headers

This commit is contained in:
DDMeaqua
2024-08-28 13:13:41 +08:00
parent d8b1781d7b
commit 318e0989a2
3 changed files with 10 additions and 7 deletions

View File

@@ -220,13 +220,16 @@ export function validString(x: string): boolean {
return x?.length > 0;
}
export function getHeaders() {
export function getHeaders(ignoreHeaders?: boolean) {
const accessStore = useAccessStore.getState();
const chatStore = useChatStore.getState();
const headers: Record<string, string> = {
"Content-Type": "application/json",
Accept: "application/json",
};
let headers: Record<string, string> = {};
if (!ignoreHeaders) {
headers = {
"Content-Type": "application/json",
Accept: "application/json",
};
}
const clientConfig = getClientConfig();