Files
Memoh/assets/guide_configuration.md.D94PMEO8.js
T
2026-01-12 11:02:01 +00:00

11 lines
7.3 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 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 &quot;配置指南&quot;"></a></h1><h2 id="环境变量" tabindex="-1">环境变量 <a class="header-anchor" href="#环境变量" aria-label="Permalink to &quot;环境变量&quot;"></a></h2><h3 id="必需配置" tabindex="-1">必需配置 <a class="header-anchor" href="#必需配置" aria-label="Permalink to &quot;必需配置&quot;"></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 &quot;可选配置&quot;"></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 &quot;模型配置&quot;"></a></h2><h3 id="创建模型" tabindex="-1">创建模型 <a class="header-anchor" href="#创建模型" aria-label="Permalink to &quot;创建模型&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;"> 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;"> &quot;GPT-4&quot;</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;"> &quot;gpt-4&quot;</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;"> &quot;https://api.openai.com/v1&quot;</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;"> &quot;your-api-key&quot;</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;"> &quot;openai&quot;</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;"> &quot;chat&quot;</span></span></code></pre></div><h3 id="设置默认模型" tabindex="-1">设置默认模型 <a class="header-anchor" href="#设置默认模型" aria-label="Permalink to &quot;设置默认模型&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;"> 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;"> &lt;</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;">&gt;</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;"> &lt;</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;">&gt;</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;"> &lt;</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;">&gt;</span></span></code></pre></div><h2 id="用户配置" tabindex="-1">用户配置 <a class="header-anchor" href="#用户配置" aria-label="Permalink to &quot;用户配置&quot;"></a></h2><h3 id="设置最大上下文时间" tabindex="-1">设置最大上下文时间 <a class="header-anchor" href="#设置最大上下文时间" aria-label="Permalink to &quot;设置最大上下文时间&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;"> 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;"> &lt;</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;">&gt;</span></span></code></pre></div><p>默认值为 900 分钟(15 小时)。</p>`,15)])])}const c=i(l,[["render",e]]);export{F as __pageData,c as default};