docs: clear up all content of docs

This commit is contained in:
Acbox
2026-02-02 23:34:43 +08:00
parent 629b3247dc
commit 9a6d4b333d
10 changed files with 41 additions and 387 deletions
+36 -44
View File
@@ -2,80 +2,72 @@ import { defineConfig } from 'vitepress'
// https://vitepress.vuejs.org/config/app-configs
export default defineConfig({
title: 'Memoh',
description: '长记忆、自托管、AI 驱动的个人生活助手',
title: 'Memoh Documentation',
description: 'Multi-Member, Structured Long-Memory, Containerized AI Agent System.',
head: [
['link', { rel: 'icon', href: '/logo.png' }]
],
// GitHub Pages 部署配置
// 使用自定义域名时,base 应该是 /
base: '/',
// 主题配置
locales: {
root: {
label: 'English',
lang: 'en'
},
zh: {
label: '简体中文',
lang: 'zh',
}
},
themeConfig: {
// 网站标题(显示在导航栏)
siteTitle: 'Memoh',
// 导航栏
nav: [
{ text: '指南', link: '/guide/getting-started' },
{ text: 'Telegram Bot', link: '/platforms/telegram' },
{ text: 'CLI 工具', link: '/cli/' }
],
// 侧边栏
sidebar: {
'/guide/': [
'/': [
{
text: '开始使用',
items: [
{ text: '快速开始', link: '/guide/getting-started' },
{ text: '安装', link: '/guide/installation' },
{ text: '配置', link: '/guide/configuration' }
]
text: 'Hello Memoh',
link: '/index.md'
},
{
text: 'Getting Started',
link: '/getting-started.md'
}
],
'/platforms/': [
'/zh/': [
{
text: '平台集成',
items: [
{ text: 'Telegram', link: '/platforms/telegram' }
]
}
],
'/cli/': [
{
text: '命令行工具',
items: [
{ text: '介绍', link: '/cli/' }
]
}
text: 'Hello Memoh',
link: '/zh/index.md'
},
]
},
// 社交链接
logo: {
src: '/logo.png',
alt: 'Memoh'
},
socialLinks: [
{ icon: 'github', link: 'https://github.com/memohai/Memoh' }
],
// 页脚
footer: {
message: '基于 MIT 许可发布',
message: 'Published under AGPLv3',
copyright: 'Copyright © 2024 Memoh'
},
// 搜索
search: {
provider: 'local'
},
// 编辑链接
editLink: {
pattern: 'https://github.com/memohai/Memoh/edit/main/docs/docs/:path',
text: ' GitHub 上编辑此页'
text: 'Edit on GitHub'
},
// 最后更新时间
lastUpdated: {
text: '最后更新于',
text: 'Last Updated',
formatOptions: {
dateStyle: 'short',
timeStyle: 'medium'
-75
View File
@@ -1,75 +0,0 @@
# CLI 工具
Memoh 提供了功能强大的命令行工具,让你可以轻松管理和配置你的 AI 助手。
## 安装
CLI 工具已包含在主项目中,无需单独安装。
## 快速开始
### 登录
```bash
pnpm cli auth login
```
或者使用参数:
```bash
pnpm cli auth login -u admin -p password
```
### 查看当前用户
```bash
pnpm cli auth whoami
```
### Agent 交互模式
```bash
pnpm cli
```
或者:
```bash
pnpm cli agent interactive
```
## 主要命令
### 认证
- `auth login` - 登录
- `auth logout` - 登出
- `auth whoami` - 查看当前用户
- `auth config` - 配置 API URL
### Agent
- `agent chat <message>` - 发送消息
- `agent interactive` - 进入交互模式
### 模型管理
- `model list` - 列出所有模型
- `model create` - 创建新模型
- `model get <id>` - 获取模型详情
- `model delete <id>` - 删除模型
- `model defaults` - 查看默认模型
### 记忆管理
- `memory search <query>` - 搜索记忆
- `memory add <content>` - 添加记忆
- `memory messages` - 查看消息历史
### 定时任务
- `schedule list` - 列出所有定时任务
- `schedule create` - 创建定时任务
- `schedule toggle <id>` - 启用/禁用任务
+1
View File
@@ -0,0 +1 @@
# Getting Started
-50
View File
@@ -1,50 +0,0 @@
# 配置指南
## 环境变量
### 必需配置
- `DATABASE_URL` - PostgreSQL 连接字符串
- `ROOT_USER` - 超级管理员用户名
- `ROOT_USER_PASSWORD` - 超级管理员密码
- `JWT_SECRET` - JWT 签名密钥
### 可选配置
- `QDRANT_URL` - Qdrant 连接字符串(默认:http://localhost:6333
- `REDIS_URL` - Redis 连接字符串(默认:redis://localhost:6379
- `API_PORT` - API 服务端口(默认:8080)
## 模型配置
### 创建模型
```bash
pnpm cli model create \
--name "GPT-4" \
--model-id "gpt-4" \
--base-url "https://api.openai.com/v1" \
--api-key "your-api-key" \
--client-type "openai" \
--type "chat"
```
### 设置默认模型
```bash
pnpm cli config set \
--chat-model <uuid> \
--summary-model <uuid> \
--embedding-model <uuid>
```
## 用户配置
### 设置最大上下文时间
```bash
pnpm cli config set --max-context-time <minutes>
```
默认值为 900 分钟(15 小时)。
-81
View File
@@ -1,81 +0,0 @@
# 快速开始
欢迎使用 Memoh!本指南将帮助你快速上手。
## 什么是 Memoh
Memoh 是一个专属于你的 AI 私人管家,你可以把它跑在你的 NAS,路由器等个人设备上,24 小时的为你提供服务。
## 环境要求
在开始之前,请确保你的系统满足以下要求:
- **PostgreSQL 16+** - 数据库
- **Bun 1.2+** - JavaScript 运行时
- **PNPM** - 包管理器
- **Qdrant** - 向量数据库
- **Redis** - 缓存和会话存储
## 安装步骤
### 1. 克隆项目
```bash
git clone https://github.com/memohai/Memoh.git
cd Memoh
```
### 2. 安装依赖
```bash
pnpm install
```
### 3. 配置环境变量
复制环境变量示例文件:
```bash
cp .env.example .env
```
编辑 `.env` 文件,配置以下变量:
```env
# 数据库配置
DATABASE_URL=postgresql://user:password@localhost:5432/memoh
# 管理员账户
ROOT_USER=admin
ROOT_USER_PASSWORD=your_password
# JWT 密钥
JWT_SECRET=your_jwt_secret_key
# Qdrant 向量数据库
QDRANT_URL=http://localhost:6333
# Redis 缓存
REDIS_URL=redis://localhost:6379
```
### 4. 初始化数据库
```bash
pnpm run db:push
```
### 5. 启动 API 服务
```bash
pnpm run api:dev
```
API 服务将在 `http://localhost:8080` 启动。
## 下一步
- [使用 CLI 工具](/cli/) - 学习如何使用命令行工具
- [配置 Telegram Bot](/platforms/telegram) - 集成 Telegram 平台
- [配置指南](/guide/configuration) - 了解如何配置 Memoh
-40
View File
@@ -1,40 +0,0 @@
# 安装指南
## 使用 PNPM(推荐)
```bash
pnpm install
```
## 使用 NPM
```bash
npm install
```
## 使用 Yarn
```bash
yarn install
```
## 开发模式
启动开发服务器:
```bash
pnpm run dev
```
## 生产构建
构建生产版本:
```bash
pnpm run build
```
## Docker 部署
(待补充 Docker 配置)
+1 -35
View File
@@ -1,35 +1 @@
---
layout: home
hero:
name: Memoh
text: AI 私人管家
tagline: 长记忆、自托管、AI 驱动的个人生活助手
actions:
- theme: brand
text: 快速开始
link: /guide/getting-started
- theme: alt
text: 查看 GitHub
link: https://github.com/memohai/Memoh
features:
- icon: 🧠
title: 长记忆能力
details: Memoh 拥有长记忆能力,可以为你的家庭成员提供个性化的服务。他会存储最近一段时间(默认最近15个小时)的上下文,超出时间后则会根据你的需求按需加载记忆。
- icon: ⏰
title: 智能定时任务
details: Memoh 可以帮你创建智能的定时任务,比如:每天早上七点生成一个早餐菜谱,通过 Telegram 发送给我。
- icon: 💬
title: 多平台支持
details: Memoh 可以支持多种聊天软件,比如:Telegram,微信,QQ等常用社交软件,通过直接发送消息与 Memoh 进行交互。
- icon: 🔒
title: 自托管部署
details: 你可以把 Memoh 跑在你的 NAS,路由器等个人设备上,24小时的为你提供服务,完全掌控你的数据。
- icon: 🚀
title: 易于使用
details: 提供命令行工具和 Web 界面,让你轻松管理和配置你的 AI 助手。
- icon: 🔧
title: 高度可定制
details: 支持多种 AI 模型,可以配置不同的聊天模型、嵌入模型和摘要模型,满足你的个性化需求。
---
# Hello Memoh
-60
View File
@@ -1,60 +0,0 @@
# Telegram Bot 集成
Memoh 支持通过 Telegram Bot 进行交互。
## 快速开始
### 1. 获取 Bot Token
1. 在 Telegram 搜索 `@BotFather`
2. 发送 `/newbot`
3. 按提示输入 bot 名称和用户名
4. 复制获得的 token
### 2. 启动 Telegram Service
```bash
pnpm telegram:start
```
Telegram Service 将在 `http://localhost:7101` 启动。
### 3. 配置 Platform
使用 CLI 工具创建 platform
```bash
pnpm cli platform create
```
根据提示配置:
- name: `telegram`
- endpoint: `http://localhost:7101`
- config: `{ "botToken": "<your-telegram-bot-token>" }`
## Bot 命令
- `/start` - 欢迎消息和命令列表
- `/login <username> <password>` - 登录到你的账户
- `/logout` - 登出
- `/whoami` - 显示当前用户信息
- `/chat <message>` - 与 AI 对话
- `/help` - 显示帮助信息
## 使用示例
```
你: /start
Bot: 👋 Welcome to Memoh Bot!
你: /login admin password
Bot: ✅ Login successful!
你: /chat 你好,介绍一下你自己
Bot: 🤖 你好!我是 Memoh AI 助手...
```

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

+1
View File
@@ -0,0 +1 @@
# Hello Memoh