Files
upage-git/upage/quick-start.html
2025-09-29 03:02:50 +00:00

62 lines
28 KiB
HTML
Raw Permalink 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.

<!doctype html>
<html lang="zh-Hans" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-quick-start" data-has-hydrated="false">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.9.0">
<title data-rh="true">快速开始 | UPage 文档</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://halo-dev.github.io/upage/img/social-card.png"><meta data-rh="true" name="twitter:image" content="https://halo-dev.github.io/upage/img/social-card.png"><meta data-rh="true" property="og:url" content="https://halo-dev.github.io/upage/quick-start"><meta data-rh="true" property="og:locale" content="zh_Hans"><meta data-rh="true" name="docusaurus_locale" content="zh-Hans"><meta data-rh="true" name="docsearch:language" content="zh-Hans"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="快速开始 | UPage 文档"><meta data-rh="true" name="description" content="本指南将帮助您快速部署和启动 UPage让您在几分钟内体验基于大模型的网页构建平台。"><meta data-rh="true" property="og:description" content="本指南将帮助您快速部署和启动 UPage让您在几分钟内体验基于大模型的网页构建平台。"><link data-rh="true" rel="icon" href="/upage/../public/favicon.svg"><link data-rh="true" rel="canonical" href="https://halo-dev.github.io/upage/quick-start"><link data-rh="true" rel="alternate" href="https://halo-dev.github.io/upage/quick-start" hreflang="zh-Hans"><link data-rh="true" rel="alternate" href="https://halo-dev.github.io/upage/quick-start" hreflang="x-default"><script data-rh="true" type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"快速开始","item":"https://halo-dev.github.io/upage/quick-start"}]}</script><link rel="stylesheet" href="/upage/assets/css/styles.8ea0c4aa.css">
<script src="/upage/assets/js/runtime~main.8350f77c.js" defer="defer"></script>
<script src="/upage/assets/js/main.648541e0.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
<svg style="display: none;"><defs>
<symbol id="theme-svg-external-link" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol>
</defs></svg>
<script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),document.documentElement.setAttribute("data-theme-choice",t||"system")}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="跳到主要内容"><a class="skipToContent_SnWU" href="#__docusaurus_skipToContent_fallback">跳到主要内容</a></div><nav aria-label="主导航" class="theme-layout-navbar navbar navbar--fixed-top"><div class="navbar__inner"><div class="theme-layout-navbar-left navbar__items"><button aria-label="切换导航栏" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/upage/"><div class="navbar__logo"><img src="/upage/img/logo.svg" alt="UPage Logo" class="themedComponent_PxYp themedComponent--light_BsnN"><img src="/upage/img/logo.svg" alt="UPage Logo" class="themedComponent_PxYp themedComponent--dark_P6BI"></div><b class="navbar__title text--truncate">UPage</b></a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/upage/">使用文档</a></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><a href="https://github.com/halo-dev/upage" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-label="(opens in new tab)" class="iconExternalLink_xtnk"><use href="#theme-svg-external-link"></use></svg></a><div class="toggle_crTl colorModeToggle_eWi8"><button class="clean-btn toggleButton_BQDk toggleButtonDisabled_lECB" type="button" disabled="" title="system mode" aria-label="切换浅色/暗黑模式当前为system mode"><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_KZAc lightToggleIcon_LT1z"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_KZAc darkToggleIcon_fJCx"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_KZAc systemToggleIcon_m6ZP"><path fill="currentColor" d="m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"></path></svg></button></div><div class="navbarSearchContainer_GyVn"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="theme-layout-main main-wrapper mainWrapper_fO6_"><div class="docsWrapper_G3eT"><button aria-label="回到顶部" class="clean-btn theme-back-to-top-button backToTopButton_nMBz" type="button"></button><div class="docRoot_iPwj"><aside class="theme-doc-sidebar-container docSidebarContainer_Yovm"><div class="sidebarViewport_e1um"><div class="sidebar_xcav"><nav aria-label="文档侧边栏" class="menu thin-scrollbar menu_EjuG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/upage/"><span title="首页" class="linkLabel_fmgc">首页</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/upage/quick-start"><span title="快速开始" class="linkLabel_fmgc">快速开始</span></a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink__DnE menu__link menu__link--sublist" href="/upage/deployment-guide"><span title="部署指南" class="categoryLinkLabel_rUKM">部署指南</span></a><button aria-label="展开侧边栏分类 &#x27;部署指南&#x27;" aria-expanded="false" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/upage/configuration"><span title="配置参考" class="linkLabel_fmgc">配置参考</span></a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink__DnE menu__link menu__link--sublist" href="/upage/user-guide"><span title="用户指南" class="categoryLinkLabel_rUKM">用户指南</span></a><button aria-label="展开侧边栏分类 &#x27;用户指南&#x27;" aria-expanded="false" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink__DnE menu__link menu__link--sublist" href="/upage/contributing"><span title="贡献指南" class="categoryLinkLabel_rUKM">贡献指南</span></a><button aria-label="展开侧边栏分类 &#x27;贡献指南&#x27;" aria-expanded="false" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/upage/faq"><span title="常见问题" class="linkLabel_fmgc">常见问题</span></a></li></ul></nav></div></div></aside><main class="docMainContainer_WqOS"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_s9lu"><div class="docItemContainer_Wij8"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_dPwh" aria-label="页面路径"><ul class="breadcrumbs"><li class="breadcrumbs__item"><a aria-label="主页面" class="breadcrumbs__link" href="/upage/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_xzA8"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link">快速开始</span></li></ul></nav><div class="tocCollapsible_S5VF theme-doc-toc-mobile tocMobile_gigA"><button type="button" class="clean-btn tocCollapsibleButton_wmrO">本页总览</button></div><div class="theme-doc-markdown markdown"><header><h1>快速开始</h1></header>
<p>本指南将帮助您快速部署和启动 UPage让您在几分钟内体验基于大模型的网页构建平台。</p>
<div class="theme-admonition theme-admonition-caution admonition_CpQR alert alert--warning"><div class="admonitionHeading_lTaP"><span class="admonitionIcon_Sec2"><svg viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>注意</div><div class="admonitionContent__UXo"><p>此快速启动方式仅适用于体验和测试目的,如需在生产环境中完整部署,请参考<a href="/upage/deployment/docker">Docker 部署指南</a></p></div></div>
<h2 class="anchor anchorWithStickyNavbar_hmm4" id="前置条件">前置条件<a href="#前置条件" class="hash-link" aria-label="前置条件的直接链接" title="前置条件的直接链接" translate="no"></a></h2>
<p>在开始之前,请确保您的系统满足以下要求:</p>
<ul>
<li>Docker 已安装(推荐 Docker 20.10.0 或更高版本)</li>
<li>至少 2GB 可用内存</li>
<li>至少 2GB 可用磁盘空间</li>
<li>互联网连接(用于拉取 Docker 镜像和访问大模型 API</li>
</ul>
<h2 class="anchor anchorWithStickyNavbar_hmm4" id="使用-docker-快速部署">使用 Docker 快速部署<a href="#使用-docker-快速部署" class="hash-link" aria-label="使用 Docker 快速部署的直接链接" title="使用 Docker 快速部署的直接链接" translate="no"></a></h2>
<p>UPage 提供了官方 Docker 镜像,可以通过以下命令快速启动:</p>
<div class="language-bash codeBlockContainer_tLQ_ theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_HMSW"><pre tabindex="0" class="prism-code language-bash codeBlock_HMKa thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_tPUF"><span class="token-line" style="color:#393A34"><span class="token plain">docker run -d \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> --name upage \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> --restart unless-stopped \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> -p 3000:3000 \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> -e LLM_PROVIDER=OpenAILike \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> -e PROVIDER_BASE_URL=your-openai-like-api-base-url \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> -e PROVIDER_API_KEY=your-openai-like-api-key \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> -e LLM_DEFAULT_MODEL=your-default-model \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> -e LLM_MINOR_MODEL=your-minor-model \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> -v ./data:/app/data \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> -v ./logs:/app/logs \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> -v ./storage:/app/storage \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> halo-dev/upage:latest</span><br></span></code></pre></div></div>
<h3 class="anchor anchorWithStickyNavbar_hmm4" id="参数说明">参数说明<a href="#参数说明" class="hash-link" aria-label="参数说明的直接链接" title="参数说明的直接链接" translate="no"></a></h3>
<ul>
<li><code>-e LLM_PROVIDER=OpenAILike</code>:设置默认的 LLM 提供商</li>
<li><code>-e PROVIDER_BASE_URL=your-openai-like-api-base-url</code>:设置 API 基础 URL</li>
<li><code>-e PROVIDER_API_KEY=your-openai-like-api-key</code>:设置 API 密钥</li>
<li><code>-e LLM_DEFAULT_MODEL=your-default-model</code>:设置用于页面生成的默认 AI 模型</li>
<li><code>-e LLM_MINOR_MODEL=your-minor-model</code>:设置用于辅助任务的 AI 模型</li>
<li><code>-v ./data:/app/data</code>:挂载数据目录,用于存储数据库文件</li>
<li><code>-v ./logs:/app/logs</code>:挂载日志目录</li>
<li><code>-v ./storage:/app/storage</code>:挂载存储目录,用于存储上传的文件</li>
</ul>
<h2 class="anchor anchorWithStickyNavbar_hmm4" id="访问-upage">访问 UPage<a href="#访问-upage" class="hash-link" aria-label="访问 UPage的直接链接" title="访问 UPage的直接链接" translate="no"></a></h2>
<p>服务启动后,您可以通过浏览器访问:</p>
<div class="language-text codeBlockContainer_tLQ_ theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_HMSW"><pre tabindex="0" class="prism-code language-text codeBlock_HMKa thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_tPUF"><span class="token-line" style="color:#393A34"><span class="token plain">http://localhost:3000</span><br></span></code></pre></div></div>
<h2 class="anchor anchorWithStickyNavbar_hmm4" id="配置-ai-提供商">配置 AI 提供商<a href="#配置-ai-提供商" class="hash-link" aria-label="配置 AI 提供商的直接链接" title="配置 AI 提供商的直接链接" translate="no"></a></h2>
<p>UPage 支持多种 AI 提供商,您需要至少配置一个 AI 提供商才能使用页面生成功能。以下是常见的 AI 提供商配置示例:</p>
<h3 class="anchor anchorWithStickyNavbar_hmm4" id="deepseek">DeepSeek<a href="#deepseek" class="hash-link" aria-label="DeepSeek的直接链接" title="DeepSeek的直接链接" translate="no"></a></h3>
<div class="language-bash codeBlockContainer_tLQ_ theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_HMSW"><pre tabindex="0" class="prism-code language-bash codeBlock_HMKa thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_tPUF"><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_PROVIDER=Deepseek \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e PROVIDER_API_KEY=your-deepseek-api-key \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_DEFAULT_MODEL=deepseek-chat \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_MINOR_MODEL=deepseek-reasoner</span><br></span></code></pre></div></div>
<h3 class="anchor anchorWithStickyNavbar_hmm4" id="兼容-openai-接口的服务">兼容 OpenAI 接口的服务<a href="#兼容-openai-接口的服务" class="hash-link" aria-label="兼容 OpenAI 接口的服务的直接链接" title="兼容 OpenAI 接口的服务的直接链接" translate="no"></a></h3>
<div class="language-bash codeBlockContainer_tLQ_ theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_HMSW"><pre tabindex="0" class="prism-code language-bash codeBlock_HMKa thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_tPUF"><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_PROVIDER=OpenAILike \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e PROVIDER_BASE_URL=https://your-api-base-url \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e PROVIDER_API_KEY=your-api-key \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_DEFAULT_MODEL=your-model-name \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_MINOR_MODEL=your-minor-model-name</span><br></span></code></pre></div></div>
<h3 class="anchor anchorWithStickyNavbar_hmm4" id="openai">OpenAI<a href="#openai" class="hash-link" aria-label="OpenAI的直接链接" title="OpenAI的直接链接" translate="no"></a></h3>
<div class="language-bash codeBlockContainer_tLQ_ theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_HMSW"><pre tabindex="0" class="prism-code language-bash codeBlock_HMKa thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_tPUF"><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_PROVIDER=OpenAI \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e PROVIDER_API_KEY=your-openai-api-key \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_DEFAULT_MODEL=gpt-4-turbo \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_MINOR_MODEL=gpt-3.5-turbo</span><br></span></code></pre></div></div>
<h3 class="anchor anchorWithStickyNavbar_hmm4" id="anthropic-claude">Anthropic Claude<a href="#anthropic-claude" class="hash-link" aria-label="Anthropic Claude的直接链接" title="Anthropic Claude的直接链接" translate="no"></a></h3>
<div class="language-bash codeBlockContainer_tLQ_ theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_HMSW"><pre tabindex="0" class="prism-code language-bash codeBlock_HMKa thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_tPUF"><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_PROVIDER=Anthropic \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e PROVIDER_API_KEY=your-anthropic-api-key \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_DEFAULT_MODEL=claude-3-opus-20240229 \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_MINOR_MODEL=claude-3-haiku-20240307</span><br></span></code></pre></div></div>
<h3 class="anchor anchorWithStickyNavbar_hmm4" id="ollama">Ollama<a href="#ollama" class="hash-link" aria-label="Ollama的直接链接" title="Ollama的直接链接" translate="no"></a></h3>
<div class="language-bash codeBlockContainer_tLQ_ theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_HMSW"><pre tabindex="0" class="prism-code language-bash codeBlock_HMKa thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_tPUF"><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_PROVIDER=Ollama \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e PROVIDER_BASE_URL=http://127.0.0.1:11434 \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_DEFAULT_MODEL=llama3 \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">-e LLM_MINOR_MODEL=llama3</span><br></span></code></pre></div></div>
<div class="theme-admonition theme-admonition-info admonition_CpQR alert alert--info"><div class="admonitionHeading_lTaP"><span class="admonitionIcon_Sec2"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>信息</div><div class="admonitionContent__UXo"><p>详细的 AI 提供商配置请阅读<a href="/upage/configuration#ai-%E6%8F%90%E4%BE%9B%E5%95%86%E9%85%8D%E7%BD%AE">配置参考</a></p></div></div>
<h2 class="anchor anchorWithStickyNavbar_hmm4" id="下一步">下一步<a href="#下一步" class="hash-link" aria-label="下一步的直接链接" title="下一步的直接链接" translate="no"></a></h2>
<ul>
<li>探索<a href="/upage/deployment/docker">Docker 部署指南</a>了解生产环境部署方案,包括使用 Docker Compose、数据备份、HTTPS 配置等</li>
<li>查看<a href="/upage/configuration">配置参考</a>了解所有可用的配置选项</li>
<li>阅读<a href="/upage/user-guide/basics">用户指南</a>学习如何使用 UPage 创建网页</li>
</ul></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="row margin-top--sm theme-doc-footer-edit-meta-row"><div class="col"><a href="https://github.com/halo-dev/upage/edit/main/docs/content/content/quick-start.md" target="_blank" rel="noopener noreferrer" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit__ZHw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>编辑此页</a></div><div class="col lastUpdated_CpfT"></div></div></footer></article><nav class="docusaurus-mt-lg pagination-nav" aria-label="文件选项卡"><a class="pagination-nav__link pagination-nav__link--prev" href="/upage/"><div class="pagination-nav__sublabel">上一页</div><div class="pagination-nav__label">首页</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/upage/deployment-guide"><div class="pagination-nav__sublabel">下一页</div><div class="pagination-nav__label">部署指南</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_dKl6 thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#前置条件" class="table-of-contents__link toc-highlight">前置条件</a></li><li><a href="#使用-docker-快速部署" class="table-of-contents__link toc-highlight">使用 Docker 快速部署</a><ul><li><a href="#参数说明" class="table-of-contents__link toc-highlight">参数说明</a></li></ul></li><li><a href="#访问-upage" class="table-of-contents__link toc-highlight">访问 UPage</a></li><li><a href="#配置-ai-提供商" class="table-of-contents__link toc-highlight">配置 AI 提供商</a><ul><li><a href="#deepseek" class="table-of-contents__link toc-highlight">DeepSeek</a></li><li><a href="#兼容-openai-接口的服务" class="table-of-contents__link toc-highlight">兼容 OpenAI 接口的服务</a></li><li><a href="#openai" class="table-of-contents__link toc-highlight">OpenAI</a></li><li><a href="#anthropic-claude" class="table-of-contents__link toc-highlight">Anthropic Claude</a></li><li><a href="#ollama" class="table-of-contents__link toc-highlight">Ollama</a></li></ul></li><li><a href="#下一步" class="table-of-contents__link toc-highlight">下一步</a></li></ul></div></div></div></div></main></div></div></div><footer class="theme-layout-footer footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="theme-layout-footer-column col footer__col"><div class="footer__title">文档</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/upage/quick-start">快速开始</a></li><li class="footer__item"><a class="footer__link-item" href="/upage/category/deployment-guide">部署指南</a></li></ul></div><div class="theme-layout-footer-column col footer__col"><div class="footer__title">社区</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/halo-dev/upage/issues" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub Issues<svg width="13.5" height="13.5" aria-label="(opens in new tab)" class="iconExternalLink_xtnk"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://github.com/halo-dev/upage/discussions" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub Discussions<svg width="13.5" height="13.5" aria-label="(opens in new tab)" class="iconExternalLink_xtnk"><use href="#theme-svg-external-link"></use></svg></a></li></ul></div><div class="theme-layout-footer-column col footer__col"><div class="footer__title">更多</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/halo-dev/upage" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-label="(opens in new tab)" class="iconExternalLink_xtnk"><use href="#theme-svg-external-link"></use></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2025 凌霞软件. Built with Docusaurus.</div></div></div></footer></div>
</body>
</html>