diff --git a/.github/workflows/run_evals.yml b/.github/workflows/run_evals.yml index 4faeaec6..0d6490d5 100644 --- a/.github/workflows/run_evals.yml +++ b/.github/workflows/run_evals.yml @@ -58,7 +58,7 @@ on: openai_base_url: description: 'Base URL of OpenAI compatible API' required: false - default: '' + default: 'https://api.openai.com/v1' type: string auto_read_webpage: description: 'Auto read webpage on online search' @@ -150,7 +150,7 @@ jobs: KHOJ_RESEARCH_ITERATIONS: ${{ github.event_name == 'workflow_dispatch' && inputs.max_research_iterations || 10 }} KHOJ_AUTO_READ_WEBPAGE: ${{ github.event_name == 'workflow_dispatch' && inputs.auto_read_webpage || 'false' }} GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} - OPENAI_BASE_URL: ${{ github.event_name == 'workflow_dispatch' && inputs.openai_base_url || '' }} + OPENAI_BASE_URL: ${{ github.event_name == 'workflow_dispatch' && inputs.openai_base_url || 'https://api.openai.com/v1' }} SERPER_DEV_API_KEY: ${{ matrix.dataset != 'math500' && secrets.SERPER_DEV_API_KEY || '' }} OLOSTEP_API_KEY: ${{ matrix.dataset != 'math500' && secrets.OLOSTEP_API_KEY || ''}} FIRECRAWL_API_KEY: ${{ matrix.dataset != 'math500' && secrets.FIRECRAWL_API_KEY || '' }} diff --git a/src/khoj/utils/initialization.py b/src/khoj/utils/initialization.py index b039c30d..903c1278 100644 --- a/src/khoj/utils/initialization.py +++ b/src/khoj/utils/initialization.py @@ -43,7 +43,7 @@ def initialization(interactive: bool = True): "🗣️ Configure chat models available to your server. You can always update these at /server/admin using your admin account" ) - openai_base_url = os.getenv("OPENAI_BASE_URL") + openai_base_url = os.getenv("OPENAI_BASE_URL") or None provider = "Ollama" if openai_base_url and openai_base_url.endswith(":11434/v1/") else "OpenAI" openai_api_key = os.getenv("OPENAI_API_KEY", "placeholder" if openai_base_url else None) default_chat_models = default_openai_chat_models @@ -329,4 +329,4 @@ def initialization(interactive: bool = True): ) return ConversationAdapters.set_default_chat_model(chat_model) - logger.info(f"🗣️ Default chat model set to {chat_model.name}") + logger.info(f"🗣️ Default chat model set to {chat_model.name} served by {chat_model.ai_model_api}")