mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
deploy: e676154057
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>404 | Memoh</title>
|
||||
<meta name="description" content="Not Found">
|
||||
<meta name="generator" content="VitePress v1.6.4">
|
||||
<link rel="preload stylesheet" href="/Memoh/assets/style.DTfNcE-A.css" as="style">
|
||||
<link rel="preload stylesheet" href="/Memoh/vp-icons.css" as="style">
|
||||
|
||||
<script type="module" src="/Memoh/assets/app.D_kyEgu7.js"></script>
|
||||
<link rel="preload" href="/Memoh/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
||||
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
||||
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"cli_index.md\":\"B_NxPQo9\",\"guide_configuration.md\":\"D94PMEO8\",\"guide_getting-started.md\":\"C7AzM1gM\",\"guide_installation.md\":\"Dpfh7SiW\",\"index.md\":\"C1JBQLP_\",\"platforms_telegram.md\":\"CQRp9-AA\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Memoh\",\"description\":\"长记忆、自托管、AI 驱动的个人生活助手\",\"base\":\"/Memoh/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"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\"}]}],\"/platforms/\":[{\"text\":\"平台集成\",\"items\":[{\"text\":\"Telegram\",\"link\":\"/platforms/telegram\"}]}],\"/cli/\":[{\"text\":\"命令行工具\",\"items\":[{\"text\":\"介绍\",\"link\":\"/cli/\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/memohai/Memoh\"}],\"footer\":{\"message\":\"基于 MIT 许可发布\",\"copyright\":\"Copyright © 2024 Memoh\"},\"search\":{\"provider\":\"local\"},\"editLink\":{\"pattern\":\"https://github.com/memohai/Memoh/edit/main/docs/docs/:path\",\"text\":\"在 GitHub 上编辑此页\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"medium\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
import{t as p}from"./chunks/theme.CMW3Dkw3.js";import{R as s,a2 as i,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as v,u as y,v as C,s as P,ac as b,ad as w,ae as R,af as E}from"./chunks/framework.BNUstrn0.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{_ as i,c as e,o as s,ag as t}from"./chunks/framework.BNUstrn0.js";const k=JSON.parse('{"title":"CLI 工具","description":"","frontmatter":{},"headers":[],"relativePath":"cli/index.md","filePath":"cli/index.md","lastUpdated":1768215522000}'),l={name:"cli/index.md"};function h(n,a,d,o,c,p){return s(),e("div",null,[...a[0]||(a[0]=[t("",26)])])}const g=i(l,[["render",h]]);export{k as __pageData,g as default};
|
||||
@@ -0,0 +1,10 @@
|
||||
import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.BNUstrn0.js";const F=JSON.parse('{"title":"配置指南","description":"","frontmatter":{},"headers":[],"relativePath":"guide/configuration.md","filePath":"guide/configuration.md","lastUpdated":1768215522000}'),l={name:"guide/configuration.md"};function e(n,s,p,k,d,r){return t(),a("div",null,[...s[0]||(s[0]=[h(`<h1 id="配置指南" tabindex="-1">配置指南 <a class="header-anchor" href="#配置指南" aria-label="Permalink to "配置指南""></a></h1><h2 id="环境变量" tabindex="-1">环境变量 <a class="header-anchor" href="#环境变量" aria-label="Permalink to "环境变量""></a></h2><h3 id="必需配置" tabindex="-1">必需配置 <a class="header-anchor" href="#必需配置" aria-label="Permalink to "必需配置""></a></h3><ul><li><code>DATABASE_URL</code> - PostgreSQL 连接字符串</li><li><code>ROOT_USER</code> - 超级管理员用户名</li><li><code>ROOT_USER_PASSWORD</code> - 超级管理员密码</li><li><code>JWT_SECRET</code> - JWT 签名密钥</li></ul><h3 id="可选配置" tabindex="-1">可选配置 <a class="header-anchor" href="#可选配置" aria-label="Permalink to "可选配置""></a></h3><ul><li><code>QDRANT_URL</code> - Qdrant 连接字符串(默认:<a href="http://localhost:6333" target="_blank" rel="noreferrer">http://localhost:6333</a>)</li><li><code>REDIS_URL</code> - Redis 连接字符串(默认:redis://localhost:6379)</li><li><code>API_PORT</code> - API 服务端口(默认:7002)</li></ul><h2 id="模型配置" tabindex="-1">模型配置 <a class="header-anchor" href="#模型配置" aria-label="Permalink to "模型配置""></a></h2><h3 id="创建模型" tabindex="-1">创建模型 <a class="header-anchor" href="#创建模型" aria-label="Permalink to "创建模型""></a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> cli</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> create</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --name</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "GPT-4"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model-id</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "gpt-4"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --base-url</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "https://api.openai.com/v1"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --api-key</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "your-api-key"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --client-type</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "openai"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --type</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "chat"</span></span></code></pre></div><h3 id="设置默认模型" tabindex="-1">设置默认模型 <a class="header-anchor" href="#设置默认模型" aria-label="Permalink to "设置默认模型""></a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> cli</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> set</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --chat-model</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">uui</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --summary-model</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">uui</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --embedding-model</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">uui</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span></span></code></pre></div><h2 id="用户配置" tabindex="-1">用户配置 <a class="header-anchor" href="#用户配置" aria-label="Permalink to "用户配置""></a></h2><h3 id="设置最大上下文时间" tabindex="-1">设置最大上下文时间 <a class="header-anchor" href="#设置最大上下文时间" aria-label="Permalink to "设置最大上下文时间""></a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> cli</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> set</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --max-context-time</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">minute</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">s</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span></span></code></pre></div><p>默认值为 900 分钟(15 小时)。</p>`,15)])])}const c=i(l,[["render",e]]);export{F as __pageData,c as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.BNUstrn0.js";const F=JSON.parse('{"title":"配置指南","description":"","frontmatter":{},"headers":[],"relativePath":"guide/configuration.md","filePath":"guide/configuration.md","lastUpdated":1768215522000}'),l={name:"guide/configuration.md"};function e(n,s,p,k,d,r){return t(),a("div",null,[...s[0]||(s[0]=[h("",15)])])}const c=i(l,[["render",e]]);export{F as __pageData,c as default};
|
||||
@@ -0,0 +1,16 @@
|
||||
import{_ as s,c as e,o as i,ag as n}from"./chunks/framework.BNUstrn0.js";const g=JSON.parse('{"title":"快速开始","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md","lastUpdated":1768215522000}'),t={name:"guide/getting-started.md"};function l(p,a,h,o,r,d){return i(),e("div",null,[...a[0]||(a[0]=[n(`<h1 id="快速开始" tabindex="-1">快速开始 <a class="header-anchor" href="#快速开始" aria-label="Permalink to "快速开始""></a></h1><p>欢迎使用 Memoh!本指南将帮助你快速上手。</p><h2 id="什么是-memoh" tabindex="-1">什么是 Memoh? <a class="header-anchor" href="#什么是-memoh" aria-label="Permalink to "什么是 Memoh?""></a></h2><p>Memoh 是一个专属于你的 AI 私人管家,你可以把它跑在你的 NAS,路由器等个人设备上,24 小时的为你提供服务。</p><h2 id="环境要求" tabindex="-1">环境要求 <a class="header-anchor" href="#环境要求" aria-label="Permalink to "环境要求""></a></h2><p>在开始之前,请确保你的系统满足以下要求:</p><ul><li><strong>PostgreSQL 16+</strong> - 数据库</li><li><strong>Bun 1.2+</strong> - JavaScript 运行时</li><li><strong>PNPM</strong> - 包管理器</li><li><strong>Qdrant</strong> - 向量数据库</li><li><strong>Redis</strong> - 缓存和会话存储</li></ul><h2 id="安装步骤" tabindex="-1">安装步骤 <a class="header-anchor" href="#安装步骤" aria-label="Permalink to "安装步骤""></a></h2><h3 id="_1-克隆项目" tabindex="-1">1. 克隆项目 <a class="header-anchor" href="#_1-克隆项目" aria-label="Permalink to "1. 克隆项目""></a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clone</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/memohai/Memoh.git</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Memoh</span></span></code></pre></div><h3 id="_2-安装依赖" tabindex="-1">2. 安装依赖 <a class="header-anchor" href="#_2-安装依赖" aria-label="Permalink to "2. 安装依赖""></a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span></span></code></pre></div><h3 id="_3-配置环境变量" tabindex="-1">3. 配置环境变量 <a class="header-anchor" href="#_3-配置环境变量" aria-label="Permalink to "3. 配置环境变量""></a></h3><p>复制环境变量示例文件:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cp</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .env.example</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .env</span></span></code></pre></div><p>编辑 <code>.env</code> 文件,配置以下变量:</p><div class="language-env vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">env</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span># 数据库配置</span></span>
|
||||
<span class="line"><span>DATABASE_URL=postgresql://user:password@localhost:5432/memoh</span></span>
|
||||
<span class="line"><span></span></span>
|
||||
<span class="line"><span># 管理员账户</span></span>
|
||||
<span class="line"><span>ROOT_USER=admin</span></span>
|
||||
<span class="line"><span>ROOT_USER_PASSWORD=your_password</span></span>
|
||||
<span class="line"><span></span></span>
|
||||
<span class="line"><span># JWT 密钥</span></span>
|
||||
<span class="line"><span>JWT_SECRET=your_jwt_secret_key</span></span>
|
||||
<span class="line"><span></span></span>
|
||||
<span class="line"><span># Qdrant 向量数据库</span></span>
|
||||
<span class="line"><span>QDRANT_URL=http://localhost:6333</span></span>
|
||||
<span class="line"><span></span></span>
|
||||
<span class="line"><span># Redis 缓存</span></span>
|
||||
<span class="line"><span>REDIS_URL=redis://localhost:6379</span></span></code></pre></div><h3 id="_4-初始化数据库" tabindex="-1">4. 初始化数据库 <a class="header-anchor" href="#_4-初始化数据库" aria-label="Permalink to "4. 初始化数据库""></a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> db:push</span></span></code></pre></div><h3 id="_5-启动-api-服务" tabindex="-1">5. 启动 API 服务 <a class="header-anchor" href="#_5-启动-api-服务" aria-label="Permalink to "5. 启动 API 服务""></a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> api:dev</span></span></code></pre></div><p>API 服务将在 <code>http://localhost:7002</code> 启动。</p><h2 id="下一步" tabindex="-1">下一步 <a class="header-anchor" href="#下一步" aria-label="Permalink to "下一步""></a></h2><ul><li><a href="/Memoh/cli/">使用 CLI 工具</a> - 学习如何使用命令行工具</li><li><a href="/Memoh/platforms/telegram.html">配置 Telegram Bot</a> - 集成 Telegram 平台</li><li><a href="/Memoh/guide/configuration.html">配置指南</a> - 了解如何配置 Memoh</li></ul>`,24)])])}const k=s(t,[["render",l]]);export{g as __pageData,k as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as s,c as e,o as i,ag as n}from"./chunks/framework.BNUstrn0.js";const g=JSON.parse('{"title":"快速开始","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md","lastUpdated":1768215522000}'),t={name:"guide/getting-started.md"};function l(p,a,h,o,r,d){return i(),e("div",null,[...a[0]||(a[0]=[n("",24)])])}const k=s(t,[["render",l]]);export{g as __pageData,k as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as s,c as i,o as e,ag as t}from"./chunks/framework.BNUstrn0.js";const k=JSON.parse('{"title":"安装指南","description":"","frontmatter":{},"headers":[],"relativePath":"guide/installation.md","filePath":"guide/installation.md","lastUpdated":1768215522000}'),n={name:"guide/installation.md"};function l(h,a,p,d,o,r){return e(),i("div",null,[...a[0]||(a[0]=[t('<h1 id="安装指南" tabindex="-1">安装指南 <a class="header-anchor" href="#安装指南" aria-label="Permalink to "安装指南""></a></h1><h2 id="使用-pnpm-推荐" tabindex="-1">使用 PNPM(推荐) <a class="header-anchor" href="#使用-pnpm-推荐" aria-label="Permalink to "使用 PNPM(推荐)""></a></h2><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span></span></code></pre></div><h2 id="使用-npm" tabindex="-1">使用 NPM <a class="header-anchor" href="#使用-npm" aria-label="Permalink to "使用 NPM""></a></h2><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span></span></code></pre></div><h2 id="使用-yarn" tabindex="-1">使用 Yarn <a class="header-anchor" href="#使用-yarn" aria-label="Permalink to "使用 Yarn""></a></h2><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">yarn</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span></span></code></pre></div><h2 id="开发模式" tabindex="-1">开发模式 <a class="header-anchor" href="#开发模式" aria-label="Permalink to "开发模式""></a></h2><p>启动开发服务器:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dev</span></span></code></pre></div><h2 id="生产构建" tabindex="-1">生产构建 <a class="header-anchor" href="#生产构建" aria-label="Permalink to "生产构建""></a></h2><p>构建生产版本:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span></span></code></pre></div><h2 id="docker-部署" tabindex="-1">Docker 部署 <a class="header-anchor" href="#docker-部署" aria-label="Permalink to "Docker 部署""></a></h2><p>(待补充 Docker 配置)</p>',15)])])}const b=s(n,[["render",l]]);export{k as __pageData,b as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as s,c as i,o as e,ag as t}from"./chunks/framework.BNUstrn0.js";const k=JSON.parse('{"title":"安装指南","description":"","frontmatter":{},"headers":[],"relativePath":"guide/installation.md","filePath":"guide/installation.md","lastUpdated":1768215522000}'),n={name:"guide/installation.md"};function l(h,a,p,d,o,r){return e(),i("div",null,[...a[0]||(a[0]=[t("",15)])])}const b=s(n,[["render",l]]);export{k as __pageData,b as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as e,c as t,o as i}from"./chunks/framework.BNUstrn0.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"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 模型,可以配置不同的聊天模型、嵌入模型和摘要模型,满足你的个性化需求。"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1768215522000}'),a={name:"index.md"};function o(n,l,s,d,m,r){return i(),t("div")}const p=e(a,[["render",o]]);export{h as __pageData,p as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as e,c as t,o as i}from"./chunks/framework.BNUstrn0.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"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 模型,可以配置不同的聊天模型、嵌入模型和摘要模型,满足你的个性化需求。"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1768215522000}'),a={name:"index.md"};function o(n,l,s,d,m,r){return i(),t("div")}const p=e(a,[["render",o]]);export{h as __pageData,p as default};
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
import{_ as e,c as s,o as t,ag as l}from"./chunks/framework.BNUstrn0.js";const m=JSON.parse('{"title":"Telegram Bot 集成","description":"","frontmatter":{},"headers":[],"relativePath":"platforms/telegram.md","filePath":"platforms/telegram.md","lastUpdated":1768215522000}'),n={name:"platforms/telegram.md"};function o(i,a,p,r,c,d){return t(),s("div",null,[...a[0]||(a[0]=[l(`<h1 id="telegram-bot-集成" tabindex="-1">Telegram Bot 集成 <a class="header-anchor" href="#telegram-bot-集成" aria-label="Permalink to "Telegram Bot 集成""></a></h1><p>Memoh 支持通过 Telegram Bot 进行交互。</p><h2 id="快速开始" tabindex="-1">快速开始 <a class="header-anchor" href="#快速开始" aria-label="Permalink to "快速开始""></a></h2><h3 id="_1-获取-bot-token" tabindex="-1">1. 获取 Bot Token <a class="header-anchor" href="#_1-获取-bot-token" aria-label="Permalink to "1. 获取 Bot Token""></a></h3><ol><li>在 Telegram 搜索 <code>@BotFather</code></li><li>发送 <code>/newbot</code></li><li>按提示输入 bot 名称和用户名</li><li>复制获得的 token</li></ol><h3 id="_2-启动-telegram-service" tabindex="-1">2. 启动 Telegram Service <a class="header-anchor" href="#_2-启动-telegram-service" aria-label="Permalink to "2. 启动 Telegram Service""></a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> telegram:start</span></span></code></pre></div><p>Telegram Service 将在 <code>http://localhost:7101</code> 启动。</p><h3 id="_3-配置-platform" tabindex="-1">3. 配置 Platform <a class="header-anchor" href="#_3-配置-platform" aria-label="Permalink to "3. 配置 Platform""></a></h3><p>使用 CLI 工具创建 platform:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> cli</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> platform</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> create</span></span></code></pre></div><p>根据提示配置:</p><ul><li>name: <code>telegram</code></li><li>endpoint: <code>http://localhost:7101</code></li><li>config: <code>{ "botToken": "<your-telegram-bot-token>" }</code></li></ul><h2 id="bot-命令" tabindex="-1">Bot 命令 <a class="header-anchor" href="#bot-命令" aria-label="Permalink to "Bot 命令""></a></h2><ul><li><code>/start</code> - 欢迎消息和命令列表</li><li><code>/login <username> <password></code> - 登录到你的账户</li><li><code>/logout</code> - 登出</li><li><code>/whoami</code> - 显示当前用户信息</li><li><code>/chat <message></code> - 与 AI 对话</li><li><code>/help</code> - 显示帮助信息</li></ul><h2 id="使用示例" tabindex="-1">使用示例 <a class="header-anchor" href="#使用示例" aria-label="Permalink to "使用示例""></a></h2><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>你: /start</span></span>
|
||||
<span class="line"><span></span></span>
|
||||
<span class="line"><span>Bot: 👋 Welcome to Memoh Bot!</span></span>
|
||||
<span class="line"><span></span></span>
|
||||
<span class="line"><span>你: /login admin password</span></span>
|
||||
<span class="line"><span></span></span>
|
||||
<span class="line"><span>Bot: ✅ Login successful!</span></span>
|
||||
<span class="line"><span></span></span>
|
||||
<span class="line"><span>你: /chat 你好,介绍一下你自己</span></span>
|
||||
<span class="line"><span></span></span>
|
||||
<span class="line"><span>Bot: 🤖 你好!我是 Memoh AI 助手...</span></span></code></pre></div>`,17)])])}const g=e(n,[["render",o]]);export{m as __pageData,g as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as e,c as s,o as t,ag as l}from"./chunks/framework.BNUstrn0.js";const m=JSON.parse('{"title":"Telegram Bot 集成","description":"","frontmatter":{},"headers":[],"relativePath":"platforms/telegram.md","filePath":"platforms/telegram.md","lastUpdated":1768215522000}'),n={name:"platforms/telegram.md"};function o(i,a,p,r,c,d){return t(),s("div",null,[...a[0]||(a[0]=[l("",17)])])}const g=e(n,[["render",o]]);export{m as __pageData,g as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"cli_index.md":"B_NxPQo9","guide_configuration.md":"D94PMEO8","guide_getting-started.md":"C7AzM1gM","guide_installation.md":"Dpfh7SiW","index.md":"C1JBQLP_","platforms_telegram.md":"CQRp9-AA"}
|
||||
+25
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.vpi-social-github{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")}
|
||||
Reference in New Issue
Block a user