返回顶部
f

filechat

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
108
下载量
0
收藏
概述
安装方式
版本历史

filechat

# FileChat Skill Your personal RAG (Retrieval-Augmented Generation) document library backed by Google Drive. ## Setup & Bootstrap If the user asks to use FileChat or asks a question about their files, FIRST verify that the required environment variables are set in `/workspace/skills/filechat/.env`: 1. `GEMINI_API_KEY` (For the embedding model `text-embedding-004`) 2. `FILECHAT_DRIVE_FOLDER_ID` (The root Google Drive folder ID to index) If they are missing, STOP and ask the user to provide them. (To find the folder ID, they can look at the URL of the folder in Google Drive: `https://drive.google.com/drive/folders/<FOLDER_ID>`) Create the `.env` file like this: ```bash echo "GEMINI_API_KEY=your_key_here" > ./skills/filechat/.env echo "FILECHAT_DRIVE_FOLDER_ID=your_folder_id_here" >> ./skills/filechat/.env ``` ## How to Sync the Library When the user asks to "sync", "flush", or "update" their FileChat library, you must run the ingestion script. This connects to Google Drive, downloads all new/changed files (including PDFs, resolving shortcuts, and traversing sub-folders), chunks the text, gets embeddings, and saves them to a local ChromaDB. ```bash cd ./skills/filechat && node sync.js ``` *(Warning: The first sync may take a few minutes depending on the folder size.)* ## How to Answer User Questions (RAG) When a user asks a question about the contents of their documents (e.g., "What does my medical discharge say?"), you MUST query the local ChromaDB vector store to fetch the relevant text chunks. ```bash cd ./skills/filechat && node query.js "What does my medical discharge say?" ``` The output will give you the most relevant text snippets, the original file names, and the Google Drive File IDs. Use the text snippets to formulate a comprehensive answer for the user. Always cite the file name you are referencing. ## How to Retrieve and Send a Physical File If the user asks for the actual file (e.g., "Send me the discharge PDF"), first find the `File ID` using the query script (if you don't already know it). Then, use the `gws` CLI to download the file into your workspace: ```bash gws drive files get --params '{"fileId": "<FILE_ID>", "alt": "media"}' > /workspace/discharge.pdf ``` Then, reply to the user using the OpenClaw media attachment syntax: `MEDIA:/workspace/discharge.pdf` to send the physical file directly to their chat window. ## How to Store a New File for the User If the user uploads a file and asks you to "store" or "save" it: 1. Upload it to their FileChat Google Drive folder using `gws`: ```bash gws drive files create \ --json '{"name": "filename.pdf", "parents": ["<FILECHAT_DRIVE_FOLDER_ID>"]}' \ --upload /path/to/uploaded/file.pdf ``` 2. Trigger the sync process so the new file is immediately readable by the vector database: ```bash cd ./skills/filechat && node sync.js ```

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 filechat-old-ugnire-1776078241 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 filechat-old-ugnire-1776078241 技能

通过命令行安装

skillhub install filechat-old-ugnire-1776078241

下载 Zip 包

⬇ 下载 filechat v1.0.0

文件大小: 7.23 KB | 发布时间: 2026-4-14 11:46

v1.0.0 最新 2026-4-14 11:46
- Initial release of FileChat skill.
- Enables secure search, retrieval, and chat with documents stored in a designated Google Drive folder using semantic vector search.
- Supports storing, syncing, and querying user files, with integration to ChromaDB and Gemini embeddings.
- Provides guidance for setup, including required environment variables and commands for syncing and querying files.
- Allows retrieval and direct sending of physical files to users via chat.
- Automates indexing and embedding of documents uploaded to Google Drive.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部