- Split backend/app/core into weather/, discord/, memory_kb/, search/ subpackages by responsibility, keeping config.py and llm.py as the shared foundation; updated all import sites accordingly. - Add local Markdown knowledge base support (local_knowledge.py, knowledge_base/fgo.md, LOCAL_KB_* settings) that embeds and injects relevant docs into the system prompt by topic similarity. - Add ruff and pyright as backend dev dependencies with basic config in pyproject.toml for linting and type checking. - Document local machine quirks in CLAUDE.md (Postgres on port 8080, SSLKEYLOGFILE breaking litellm/pyright via OPENSSL_Uplink crashes). - Add backend/run_dev.ps1 dev launcher and docs/discord-bot.md.
14 lines
434 B
Python
14 lines
434 B
Python
"""Discord Webhook への通知送信。"""
|
|
import logging
|
|
|
|
import httpx
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
async def send_discord_message(webhook_url: str, content: str) -> None:
|
|
async with httpx.AsyncClient(timeout=10.0) as client:
|
|
response = await client.post(webhook_url, json={"content": content})
|
|
response.raise_for_status()
|
|
logger.info("Discord message sent (status=%s)", response.status_code)
|