- POST /webhook/synology: outgoing webhook 수신 + token 검증 - 파이프라인 완료 시 incoming webhook으로 응답 자동 전송 - "분석 중..." typing 메시지 선전송 - 응답 길이 1500자 제한 (Synology Chat 제한 대응) - 에러/실패 시에도 사용자에게 알림 메시지 전송 - 중복 요청 방지 (30초 TTL dedup) - Synology에서 rewrite 이벤트 숨김 (SSE에서만 노출) - callback 구조로 확장 가능 (Slack, Discord 등) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
44 lines
1.1 KiB
Python
44 lines
1.1 KiB
Python
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
# EXAONE (rewriter) via Ollama
|
|
exaone_base_url: str = "http://localhost:11434"
|
|
exaone_model: str = "exaone3.5:7.8b-instruct-q8_0"
|
|
exaone_temperature: float = 0.7
|
|
exaone_timeout: float = 30.0 # rewrite는 짧아야 함
|
|
|
|
# Gemma 4 (reasoner) via MLX on Mac mini
|
|
reasoning_base_url: str = "http://192.168.1.122:8800"
|
|
reasoning_model: str = "mlx-community/gemma-4-26b-a4b-it-8bit"
|
|
reasoning_temperature: float = 0.7
|
|
reasoning_timeout: float = 180.0
|
|
|
|
# Pipeline
|
|
pipeline_enabled: bool = True # False = EXAONE 단독 모드 (Phase 1 fallback)
|
|
|
|
# Queue
|
|
max_concurrent_jobs: int = 3
|
|
|
|
# Health check
|
|
health_check_interval: float = 30.0
|
|
|
|
# Server
|
|
host: str = "0.0.0.0"
|
|
port: int = 8100
|
|
|
|
# DB
|
|
db_path: str = "/app/data/nanoclaude.db"
|
|
|
|
# Synology Chat (비어있으면 비활성화)
|
|
synology_incoming_url: str = ""
|
|
synology_outgoing_token: str = ""
|
|
|
|
# Optional API key (empty = disabled)
|
|
api_key: str = ""
|
|
|
|
model_config = {"env_file": ".env", "extra": "ignore"}
|
|
|
|
|
|
settings = Settings()
|