- Remove agent/agent.md (dev-time agent context dumps), .DS_Store, committed venv configs (pyvenv.cfg), 0-byte runtime cache - Remove hardcoded /home/userpath from cron_scraper feed lookup - Replace ad-hoc test_implementation.py with pytest tests/test_scraper_cache.py - ruff clean (33 fixes: bare excepts, unused Config, whitespace) - Root pyproject.toml (activates shared Gitea CI), MIT LICENSE, README Tests
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
"""
|
|
Configuration settings for the AI Processor
|
|
"""
|
|
|
|
import os
|
|
|
|
# AI Server Configuration
|
|
AI_SERVER_HOST = os.getenv("AI_SERVER_HOST", "example.com")
|
|
AI_SERVER_PORT = int(os.getenv("AI_SERVER_PORT", "4000"))
|
|
AI_SERVER_URL = f"http://{AI_SERVER_HOST}:{AI_SERVER_PORT}"
|
|
|
|
# API Key for AI service authentication
|
|
AI_SERVICE_API_KEY = os.getenv("AI_SERVICE_API_KEY", "111") # Default to "111" as specified
|
|
|
|
# Cache file for tracking processed articles
|
|
CACHE_FILE = os.getenv("CACHE_FILE", "ai_processor/processed_articles_cache.json")
|
|
|
|
# Batch processing configuration
|
|
BATCH_SIZE = int(os.getenv("PROCESSING_BATCH_SIZE", "50"))
|
|
|
|
# Embedding model configuration
|
|
EMBEDDING_MODEL = os.getenv("EMBEDDING_MODEL", "qwen3:8b")
|
|
FACT_EXTRACTION_MODEL = os.getenv("FACT_EXTRACTION_MODEL", "gpt-oss")
|
|
|
|
# Logging configuration
|
|
LOG_FILE = os.getenv("LOG_FILE", "ai_processor/ai_processor.log")
|
|
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO")
|
|
|
|
# ChromaDB Configuration
|
|
CHROMADB_HOST = os.getenv("CHROMADB_HOST", "example.com")
|
|
CHROMADB_PORT = int(os.getenv("CHROMADB_PORT", "8000"))
|
|
|
|
# Collection names
|
|
FACTS_COLLECTION_NAME = "facts"
|
|
ARTICLES_COLLECTION_NAME = "articles"
|