Add system memory monitoring, Bedrock support, and Discord integrations

- Add CPU/GPU memory monitoring endpoint and frontend widget
- Add Amazon Bedrock model support (API key / inference profiles) plus model selector entries
- Add Discord weather/laundry notification job (JMA forecast + LLM-generated message)
- Add Discord bot that replies to mentions via the configured LLM, with weather-aware context
- Add scheduled "useless tips" job with separate webhook and quiet-hours skip
- Switch FastAPI startup to lifespan handler, log viewer, markdown rendering, and toast UI additions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 00:59:38 +09:00
co-authored by Claude Sonnet 4.6
parent 903d34761c
commit 4a08ba29fa
34 changed files with 5051 additions and 160 deletions
+28 -1
View File
@@ -1,11 +1,38 @@
# LLM設定
DEFAULT_MODEL=gpt-4o
DEFAULT_MODEL=gpt-5.4
# OpenAI
OPENAI_API_KEY=sk-...
# Anthropic
ANTHROPIC_API_KEY=sk-ant-...
# Ollama (ローカル) — APIキー不要、モデル名は ollama/llama3 形式で指定
OLLAMA_API_BASE=http://localhost:11434
# Amazon Bedrock (API key方式) — モデル名は bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0 形式で指定
AWS_BEARER_TOKEN_BEDROCK=
AWS_REGION_NAME=us-east-1
# デバッグ (true にすると LiteLLM の詳細ログが出力される)
DEBUG=false
# 天気予報 → Discord 通知
DISCORD_WEBHOOK_URL=
WEATHER_AREA_CODE=120000
WEATHER_AREA_KEYWORD=北西部
WEATHER_NOTIFY_HOUR=22
WEATHER_NOTIFY_MINUTE=0
# 通知文をLLMで生成する場合のモデル(未設定ならDEFAULT_MODELを使用)
WEATHER_NOTIFY_MODEL=
# Discord Bot(メンションへの自動返信用)
DISCORD_BOT_TOKEN=
# 未設定ならデフォルトの「お天気アプリ」ペルソナが使われる
DISCORD_BOT_SYSTEM_PROMPT=
# どうでもいいtipsを定期的にDiscordへ投稿
USELESS_TIPS_ENABLED=false
USELESS_TIPS_INTERVAL_HOURS=3
USELESS_TIPS_MODEL=
# 未設定ならDISCORD_WEBHOOK_URL(天気通知と同じ)を使う
DISCORD_WEBHOOK_URL_TIPS=
# アプリ設定
DATABASE_URL=sqlite:///./playchat.db