diff --git a/servers/fastapi/api/utils/model_utils.py b/servers/fastapi/api/utils/model_utils.py index 2673adeb..9274faac 100644 --- a/servers/fastapi/api/utils/model_utils.py +++ b/servers/fastapi/api/utils/model_utils.py @@ -36,10 +36,10 @@ def get_selected_llm_provider() -> SelectedLLMProvider: async def list_available_custom_models( url: Optional[str] = None, api_key: Optional[str] = None ) -> list[str]: - if not url or not api_key: + if not url: client = get_llm_client() else: - client = openai.AsyncOpenAI(api_key=api_key, base_url=url) + client = openai.AsyncOpenAI(api_key=api_key or "null", base_url=url) models = [] async for model in client.models.list(): models.append(model.id) @@ -70,7 +70,7 @@ def get_llm_api_key(): elif selected_llm == SelectedLLMProvider.OLLAMA: return "ollama" elif selected_llm == SelectedLLMProvider.CUSTOM: - return os.getenv("CUSTOM_LLM_API_KEY") + return os.getenv("CUSTOM_LLM_API_KEY") or "null" else: raise ValueError(f"Invalid LLM API key") diff --git a/servers/fastapi/assets/images/placeholder.jpg b/servers/fastapi/assets/images/placeholder.jpg index 704ca2e3..dec5c65c 100644 Binary files a/servers/fastapi/assets/images/placeholder.jpg and b/servers/fastapi/assets/images/placeholder.jpg differ diff --git a/servers/nextjs/app/settings/SettingPage.tsx b/servers/nextjs/app/settings/SettingPage.tsx index a93dff81..c487f47a 100644 --- a/servers/nextjs/app/settings/SettingPage.tsx +++ b/servers/nextjs/app/settings/SettingPage.tsx @@ -266,8 +266,7 @@ const SettingsPage = () => { fetchOllamaModels(); } else if (userConfigState.llm_config.LLM === 'custom' && userConfigState.llm_config.CUSTOM_MODEL && - userConfigState.llm_config.CUSTOM_LLM_URL && - userConfigState.llm_config.CUSTOM_LLM_API_KEY) { + userConfigState.llm_config.CUSTOM_LLM_URL) { fetchCustomModels(); } }, [userConfigState.llm_config.LLM]); @@ -515,11 +514,6 @@ const SettingsPage = () => {

Provide a Pexels API key to generate presentation images

- {downloadingModel.status && downloadingModel.status !== 'pulled' && ( -
- {downloadingModel.status} -
- )} )} @@ -618,8 +612,8 @@ const SettingsPage = () => {