You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
900 B
34 lines
900 B
"""
|
|
settings.py — Configuration for the ingestion worker, loaded from environment variables.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file='.env', extra='ignore')
|
|
|
|
# Database
|
|
database_url: str = 'postgresql://brain:brain@postgres:5432/second_brain'
|
|
|
|
# Vault
|
|
vault_path: str = '/vault'
|
|
|
|
# Ollama
|
|
ollama_url: str = 'http://ollama:11434'
|
|
|
|
# Embedding
|
|
embedding_provider: str = 'ollama' # ollama | sentence_transformers
|
|
embedding_model: str = 'nomic-embed-text'
|
|
|
|
# Chunking
|
|
chunk_size: int = 700
|
|
chunk_overlap: int = 70
|
|
|
|
# Worker behaviour
|
|
poll_interval: int = 30 # seconds between fallback polls
|
|
batch_size: int = 20 # files per ingestion batch
|
|
log_level: str = 'INFO'
|