Files
Memoh/assets/guide_getting-started.md.C7AzM1gM.js
T
2026-01-12 11:02:01 +00:00

17 lines
6.6 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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 &quot;快速开始&quot;"></a></h1><p>欢迎使用 Memoh!本指南将帮助你快速上手。</p><h2 id="什么是-memoh" tabindex="-1">什么是 Memoh <a class="header-anchor" href="#什么是-memoh" aria-label="Permalink to &quot;什么是 Memoh&quot;"></a></h2><p>Memoh 是一个专属于你的 AI 私人管家,你可以把它跑在你的 NAS,路由器等个人设备上,24 小时的为你提供服务。</p><h2 id="环境要求" tabindex="-1">环境要求 <a class="header-anchor" href="#环境要求" aria-label="Permalink to &quot;环境要求&quot;"></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 &quot;安装步骤&quot;"></a></h2><h3 id="_1-克隆项目" tabindex="-1">1. 克隆项目 <a class="header-anchor" href="#_1-克隆项目" aria-label="Permalink to &quot;1. 克隆项目&quot;"></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 &quot;2. 安装依赖&quot;"></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 &quot;3. 配置环境变量&quot;"></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 &quot;4. 初始化数据库&quot;"></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 &quot;5. 启动 API 服务&quot;"></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 &quot;下一步&quot;"></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};