← Back to Skills Marketplace
claws-peak

NotebookLM RAG Line

by claws-peak · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
68
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install notebooklm-rag-line
Description
將 NotebookLM 知識自動同步到 LINE AI 助教的 RAG 知識庫,支援自動問答、向量化與延續問題建議。適用於教學助教、客服機器人或個人知識管理。
README (SKILL.md)

notebooklm-rag-line

將 NotebookLM 知識自動同步到 LINE AI 助教的 RAG 知識庫。

功能

  • ✅ 向 NotebookLM 提問取得答案
  • ✅ 自動產生 embedding(bge-m3)
  • ✅ 存入本地 SQLite RAG 知識庫
  • ✅ 支援 LINE 聊天機器人回覆
  • ✅ LLM 生成延續問題建議

系統架構

NotebookLM 來源
    ↓(老闆新增網站)
patchright 自動提問
    ↓(取得答案)
bge-m3 embedding(Ollama)
    ↓(1024維向量)
rag_embeddings.db(SQLite)
    ↓
RAG Server (port 3002)
    ↓
line_webhook.aspx(LINE 回覆)
    ↓
學員收到回答 + 延續問題建議

核心檔案

檔案 用途
rag_enhance.py 主腳本:向 NotebookLM 提問並存入 RAG
rag_server.py Python HTTP Server,處理學員問答
rag_embeddings.db SQLite 向量知識庫
line_webhook.aspx LINE Webhook 接收器

必要環境

元件 版本 備註
Python 3.8+ 建議 3.10+
Ollama 最新版 安裝 ollama serve
bge-m3:latest Embedding 模型 ollama pull bge-m3:latest
gemma3:4b-cloud LLM 模型 ollama pull gemma3:4b-cloud
patchright 最新版 pip install patchright

快速開始

Step 1:安裝依賴

pip install patchright
ollama pull bge-m3:latest
ollama pull gemma3:4b-cloud

Step 2:修改設定

編輯 rag_enhance.py 開頭的設定區塊:

CHROME_PROFILE = "你的 Chrome profile 路徑"
NOTEBOOK_ID = "你的 NotebookLM 筆記本 ID"
OLLAMA_HOST = "127.0.0.1"
OLLAMA_PORT = 11434
EMBEDDING_MODEL = "bge-m3:latest"
DB_PATH = r"你的\RAG\資料庫\路徑\rag_embeddings.db"

Step 3:準備問題清單

QUESTIONS 陣列中加入你想問的問題:

QUESTIONS = [
    "Cloudflare Pages 是什麼?",
    "如何部署網站到 Cloudflare Pages?",
    # ... 更多問題
]

Step 4:執行

python rag_enhance.py

腳本會自動:

  1. 啟動 Chrome 並登入 NotebookLM
  2. 逐一問問題(約 40 秒/題)
  3. 取得答案後自動存入 RAG
  4. 完成後發送 LINE 通知

RAG Server(可選)

啟動本地 RAG Server 處理即時查詢:

python rag_server.py

Server 會監聽 http://127.0.0.1:3002/query

Request 格式:

{
  "question": "Cloudflare Pages 是什麼?",
  "history": "[]",
  "user_id": "anonymous"
}

Response 格式:

{
  "answer": "Cloudflare Pages 是...",
  "suggestions": ["問題1", "問題2", "問題3"]
}

自動化(凌晨執行)

使用 Windows Task Scheduler 每天凌晨自動更新:

# 建立排程工作
$action = New-ScheduledTaskAction -Execute "python" -Argument "D:\
ode_app\cron\rag_enhance.py"
$trigger = New-ScheduledTaskTrigger -Daily -At "01:00"
Register-ScheduledTask -TaskName "RAG_NotebookLM_Update" -Action $action -Trigger $trigger -Description "NotebookLM RAG 自動更新"

資料庫結構

CREATE TABLE rag_embeddings (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    question TEXT NOT NULL,
    answer TEXT NOT NULL,
    embedding BLOB NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

注意事項

  • 金鑰安全:LINE_TOKEN、RAG_URL 等敏感資訊應放在 .env 檔案,絕對不要 commit 到公開 repo
  • NotebookLM 配額:免費版每天可問 50 次,注意不要超標
  • Embedding 超時:建議加入 warmup 設定避免 timeout
  • Chrome Profile:建議使用專用 profile,避免影響一般瀏覽器使用

授權

MIT License - 可自由使用、修改與發布


🦞 爪子鋒利,什麼都能搞定!

Usage Guidance
Before installing, be comfortable with the skill using a logged-in Chrome profile for NotebookLM. Use a dedicated browser profile, pin and preinstall dependencies instead of allowing runtime pip installs, review the hardcoded paths and notebook ID, and only enable the scheduled task if you want daily automated updates.
Capability Assessment
Purpose & Capability
The described workflow is coherent: ask NotebookLM questions, create embeddings with Ollama, store them in SQLite, and serve RAG answers locally. However, the docs list a LINE webhook file that is not included in the manifest, so the LINE integration is not fully reviewable from the supplied artifacts.
Instruction Scope
The skill asks the user to edit the Chrome profile, NotebookLM notebook ID, database path, and question list before running. That is mostly user-directed, but the browser automation will act under whatever logged-in profile the user provides.
Install Mechanism
The script automatically runs an unpinned pip install for patchright at runtime if the package is missing, while the registry install metadata only declares a Node install for ollama and does not fully declare Python dependencies.
Credentials
The skill uses a persistent Chrome profile to access NotebookLM, which is high-impact account/session access. This is purpose-aligned but not declared as a credential requirement and should be tightly scoped to a dedicated profile.
Persistence & Privilege
The artifacts document an optional Windows Task Scheduler job and a local HTTP server. These are disclosed and user-directed, but they can keep the automation running daily or serving local queries until the user stops them.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install notebooklm-rag-line
  3. After installation, invoke the skill by name or use /notebooklm-rag-line
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: NotebookLM to RAG knowledge base sync with LINE chatbot support
Metadata
Slug notebooklm-rag-line
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is NotebookLM RAG Line?

將 NotebookLM 知識自動同步到 LINE AI 助教的 RAG 知識庫,支援自動問答、向量化與延續問題建議。適用於教學助教、客服機器人或個人知識管理。 It is an AI Agent Skill for Claude Code / OpenClaw, with 68 downloads so far.

How do I install NotebookLM RAG Line?

Run "/install notebooklm-rag-line" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is NotebookLM RAG Line free?

Yes, NotebookLM RAG Line is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does NotebookLM RAG Line support?

NotebookLM RAG Line is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created NotebookLM RAG Line?

It is built and maintained by claws-peak (@claws-peak); the current version is v1.0.0.

💬 Comments