From a1a0f6923b49e0fc9086b39b6a2a5c257859f1d9 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 7 Dec 2025 00:10:30 +0100 Subject: [PATCH] feat: add SearXNG configuration for web search tool - Add SEARXNG_HOST config with localhost:8087 default - Add SEARXNG_TIMEOUT setting (30 seconds default) - Update .env.example with SearXNG configuration - Supports both local and production SearXNG instances --- .env.example | 4 ++++ src/core/config.py | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 07cae90..668ba43 100644 --- a/.env.example +++ b/.env.example @@ -14,6 +14,10 @@ OLLAMA_HOST=http://your-ollama-host:11434 OLLAMA_DEFAULT_MODEL=mistral-nemo:latest OLLAMA_TIMEOUT=120 +# SearXNG Configuration +SEARXNG_HOST=http://searxng:8087 +SEARXNG_TIMEOUT=30 + # Logging LOG_LEVEL=INFO diff --git a/src/core/config.py b/src/core/config.py index 2cb7aac..0d9b3d2 100644 --- a/src/core/config.py +++ b/src/core/config.py @@ -32,7 +32,7 @@ class Config(BaseSettings): # Application APP_NAME: str = "OpenAI-Compatible API" - APP_VERSION: str = "0.1.1" + APP_VERSION: str = "0.2.0" ENVIRONMENT: Environment = Environment.DEVELOPMENT DEBUG: bool = Field(default=False, description="Debug mode") @@ -59,6 +59,16 @@ class Config(BaseSettings): description="Timeout for each streaming turn in seconds" ) + # SearXNG Configuration + SEARXNG_HOST: HttpUrl = Field( + default="http://localhost:8087", + description="SearXNG server URL" + ) + SEARXNG_TIMEOUT: int = Field( + default=30, + description="SearXNG request timeout in seconds" + ) + # Logging LOG_LEVEL: str = Field(default="INFO", description="Logging level")