ข้ามไปที่เนื้อหา

Morning Digest

บรีฟประจำวันเฉพาะบุคคลที่รวบรวมข้อมูลจากบริการที่เชื่อมต่อไว้ของคุณ สังเคราะห์เป็น เรื่องเล่าแบบพูดด้วย LLM ในเครื่อง แล้วส่งมอบเป็นเสียงผ่าน text-to-speech

Quickstart (5 นาที)

1. ติดตั้งและตั้งค่า OpenJarvis

git clone https://github.com/open-jarvis/OpenJarvis.git
cd OpenJarvis
uv sync --extra dev

2. เริ่ม LLM ในเครื่องผ่าน Ollama

# Install Ollama: https://ollama.com
ollama pull qwen3.5:9b    # or any model you prefer

3. ตั้งค่า Digest

แก้ไข ~/.openjarvis/config.toml:

[engine]
default = "ollama"

[intelligence]
default_model = "qwen3.5:9b"

[digest]
enabled = true
schedule = "0 6 * * *"          # 6 AM daily (cron syntax)
timezone = "America/Los_Angeles"
persona = "jarvis"
honorific = "sir"               # or "ma'am", "boss", etc.
tts_backend = "cartesia"        # or "openai"
voice_id = "c8f7835e-28a3-4f0c-80d7-c1302ac62aae"  # Alistair (British male)
voice_speed = 1.2
sections = ["health", "messages", "calendar", "world"]

[digest.health]
sources = ["oura"]

[digest.messages]
sources = ["gmail", "google_tasks", "slack", "imessage"]

[digest.calendar]
sources = ["gcalendar"]

[digest.world]
sources = ["weather", "hackernews", "news_rss"]

4. เชื่อมต่อแหล่งข้อมูลของคุณ

# Google (one flow covers Gmail, Calendar, Tasks, Contacts, Drive)
jarvis connect gdrive
# Paste: <client_id>:<client_secret> — browser opens automatically

# Oura Ring (personal access token)
jarvis connect oura
# Paste your token from https://cloud.ouraring.com/personal-access-tokens

# Spotify
jarvis connect spotify

# Strava
jarvis connect strava

สำหรับ Weather, GitHub และ News — บันทึกไฟล์ credential โดยตรง:

# Weather (OpenWeatherMap — free at https://openweathermap.org/api)
echo '{"api_key": "YOUR_KEY", "location": "San Francisco,CA,US"}' > ~/.openjarvis/connectors/weather.json

# GitHub notifications (token from https://github.com/settings/tokens)
echo '{"token": "ghp_YOUR_TOKEN"}' > ~/.openjarvis/connectors/github.json

# News RSS (no auth needed — configure your feeds)
cat > ~/.openjarvis/connectors/news_rss.json << 'EOF'
{"feeds": [
  {"name": "Arxiv CS.AI", "url": "https://rss.arxiv.org/rss/cs.AI"},
  {"name": "TechCrunch", "url": "https://techcrunch.com/feed/"},
  {"name": "Bloomberg", "url": "https://feeds.bloomberg.com/markets/news.rss"},
  {"name": "WSJ", "url": "https://feeds.a.dj.com/rss/RSSWorldNews.xml"}
]}
EOF

Hacker News, iMessage และ Apple Music ทำงานอัตโนมัติบน macOS โดยไม่ต้องตั้งค่าเพิ่ม

5. ตั้งค่า API Key ของ TTS

# Cartesia (sign up at https://play.cartesia.ai)
export CARTESIA_API_KEY="sk_car_..."

# Or OpenAI (https://platform.openai.com/api-keys)
export OPENAI_API_KEY="sk-proj-..."

6. รัน Digest ครั้งแรกของคุณ

CARTESIA_API_KEY="sk_car_..." jarvis digest --fresh

Digest จะ: 1. รวบรวมข้อมูลจากทุกแหล่งที่เชื่อมต่อไว้ 2. สังเคราะห์บรีฟแบบพูดด้วย Qwen3.5 9B 3. สร้างเสียงด้วยเสียง Cartesia Alistair 4. พิมพ์ข้อความและเล่นเสียง

คำสั่ง CLI

jarvis digest --fresh          # Generate a new digest now
jarvis digest                  # Show today's cached digest
jarvis digest --text-only      # Print text without audio
jarvis digest --history        # Show past digests
jarvis digest --schedule "0 6 * * *"   # Set daily schedule
jarvis digest --schedule off   # Disable schedule
jarvis digest --schedule       # Show current schedule

การพูด "Good Morning"

เมื่อแชทกับ Jarvis (ผ่าน CLI, เดสก์ท็อป หรือเบราว์เซอร์) การพูดว่า "Good morning" หรือ "morning digest" จะกระตุ้น digest โดยอัตโนมัติ -- ไม่ต้องใช้คำสั่ง digest โดยตรง

เอกสารอ้างอิง Configuration

Sections

รายการ sections ควบคุมว่า digest ครอบคลุมอะไรบ้าง เรียงตามลำดับความสำคัญ:

Section แหล่งข้อมูล สิ่งที่ให้
health oura, apple_health, strava การนอน, ความพร้อม, กิจกรรม, การออกกำลังกาย
messages gmail, google_tasks, slack, notion, imessage, github_notifications คัดกรองอีเมล, งาน, ข้อความ, Slack, PR
calendar gcalendar กิจกรรมและตารางวันนี้
world weather, hackernews, news_rss พยากรณ์อากาศ, ข่าวเทคโนโลยี, RSS feed
music spotify, apple_music เพลงที่เล่นล่าสุด (เปิดใช้เองได้)

เสียง TTS

Cartesia (แนะนำ — เป็นธรรมชาติ มีอารมณ์): | เสียง | ID | คำอธิบาย | |-------|----|-------------| | Alistair | c8f7835e-28a3-4f0c-80d7-c1302ac62aae | ชายอังกฤษ สุขุม | | Benedict | 3c0f09d6-e0d7-499c-a594-70c5b7b93048 | ชายอังกฤษ เป็นทางการ ขัดเกลา | | Harrison | df89f42f-f285-4613-adbf-14eedcec4c9e | ชายอังกฤษ ชัดเจน มืออาชีพ | | Sterling | b134c304-d095-4d2b-a77a-914f5e8e84e7 | ทุ้มลึก น่าเชื่อถือ สง่างาม |

OpenAI TTS: | เสียง | คำอธิบาย | |-------|-------------| | onyx | ชายเสียงทุ้ม | | nova | หญิง อบอุ่น | | alloy | เป็นกลาง | | shimmer | หญิง มีอารมณ์ |

Persona

ฟิลด์ persona โหลดไฟล์ prompt จาก configs/openjarvis/prompts/personas/{name}.md persona เริ่มต้น jarvis ส่งมอบบรีฟด้วยมุกตลกแห้งๆ แบบอังกฤษ ให้ความสำคัญกับรายการเร่งด่วนก่อน และตีความข้อมูลสุขภาพเป็นแนวโน้มมากกว่าตัวเลขดิบ

หากต้องการสร้าง persona กำหนดเอง เพิ่มไฟล์ .md ใหม่ในไดเรกทอรี personas

News Feeds

เพิ่ม RSS หรือ Atom feed ใดๆ ลงใน ~/.openjarvis/connectors/news_rss.json:

{"feeds": [
  {"name": "Arxiv CS.AI", "url": "https://rss.arxiv.org/rss/cs.AI"},
  {"name": "Arxiv CS.LG", "url": "https://rss.arxiv.org/rss/cs.LG"},
  {"name": "NYT Top Stories", "url": "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"},
  {"name": "TechCrunch", "url": "https://techcrunch.com/feed/"},
  {"name": "Bloomberg Markets", "url": "https://feeds.bloomberg.com/markets/news.rss"},
  {"name": "WSJ World News", "url": "https://feeds.a.dj.com/rss/RSSWorldNews.xml"},
  {"name": "Hacker News", "url": "https://hnrss.org/frontpage"}
]}

API Endpoints

Digest ยังเข้าถึงได้ผ่านเซิร์ฟเวอร์ FastAPI:

jarvis serve  # Start the server

# GET  /api/digest           — Get today's digest text
# GET  /api/digest/audio     — Stream the digest audio (MP3)
# POST /api/digest/generate  — Force re-generation
# GET  /api/digest/history   — Past digests
# GET  /api/digest/schedule  — Current schedule config
# POST /api/digest/schedule  — Update schedule {"enabled": true, "cron": "0 6 * * *"}

Frontend

แอปเดสก์ท็อปและเบราว์เซอร์แสดงตัวเล่นเสียงแบบ inline เมื่อสร้าง digest แล้ว ปุ่ม "Connect" ใน setup wizard จัดการ OAuth flow ให้อัตโนมัติ -- คลิกเพื่อเชื่อมต่อ อนุญาตใน popup ของเบราว์เซอร์ เสร็จเรียบร้อย

การแก้ปัญหา

"No digest for today" — รัน jarvis digest --fresh เพื่อสร้างใหม่

Section ว่างเปล่า — ตรวจสอบสถานะ connector ด้วย jarvis connect --list ตรวจสอบว่า token ยังไม่หมดอายุ (token ของ Google/Spotify หมดอายุหลัง 1 ชั่วโมง และถูก refresh อัตโนมัติเมื่อใช้งานครั้งถัดไป)

Weather ใช้งานไม่ได้ — API key ของ OpenWeatherMap อาจใช้เวลาถึง 2 ชั่วโมงในการเปิดใช้งานหลังสร้าง ใช้รูปแบบ City,State,Country (เช่น Palo Alto,CA,US)

GitHub 403 — personal access token ของคุณต้องมีสิทธิ์ notifications ใต้ Account permissions (ไม่ใช่ Repository permissions)

เสียงไม่เล่น — ตรวจสอบว่าตั้งค่า CARTESIA_API_KEY หรือ OPENAI_API_KEY แล้ว ตรวจสอบเครดิตที่ https://play.cartesia.ai หรือ https://platform.openai.com