diff --git a/ui/components/ChatWindow.tsx b/ui/components/ChatWindow.tsx index ca08dfa..79f93a8 100644 --- a/ui/components/ChatWindow.tsx +++ b/ui/components/ChatWindow.tsx @@ -36,6 +36,11 @@ const useSocket = (url: string) => { ) { const providers = await fetch( `${process.env.NEXT_PUBLIC_API_URL}/models`, + { + headers: { + 'Content-Type': 'application/json', + }, + }, ).then(async (res) => await res.json()); const chatModelProviders = providers.chatModelProviders; diff --git a/ui/components/SettingsDialog.tsx b/ui/components/SettingsDialog.tsx index 41c10cf..f77a95c 100644 --- a/ui/components/SettingsDialog.tsx +++ b/ui/components/SettingsDialog.tsx @@ -46,7 +46,11 @@ const SettingsDialog = ({ if (isOpen) { const fetchConfig = async () => { setIsLoading(true); - const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/config`); + const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/config`, { + headers: { + 'Content-Type': 'application/json', + }, + }); const data = await res.json(); setConfig(data); setIsLoading(false); @@ -251,7 +255,7 @@ const SettingsDialog = ({ )} {/* Embedding models */} - {config.chatModelProviders && ( + {config.embeddingModelProviders && (

Embedding model Provider