Files
Memoh/assets/zh_getting-started_provider-and-model.md.Dh-N6ess.js
2026-04-24 06:37:27 +00:00

2 lines
8.8 KiB
JavaScript
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.
import{_ as e,o,c as d,ag as a}from"./chunks/framework.CAXxHpAX.js";const g=JSON.parse('{"title":"供应商与模型","description":"","frontmatter":{},"headers":[],"relativePath":"zh/getting-started/provider-and-model.md","filePath":"zh/getting-started/provider-and-model.md","lastUpdated":1777012567000}'),r={name:"zh/getting-started/provider-and-model.md"};function i(l,t,n,h,c,s){return o(),d("div",null,[...t[0]||(t[0]=[a('<h1 id="供应商与模型" tabindex="-1">供应商与模型 <a class="header-anchor" href="#供应商与模型" aria-label="Permalink to &quot;供应商与模型&quot;"></a></h1><p>日常用 Memoh,多半要配好:</p><ul><li>一个或多个 <strong>供应商</strong>(怎么连上游 API</li><li>其下的 <strong>模型</strong></li><li>若要朗读,再配 <strong>语音相关</strong>(见 <a href="/zh/tts-providers/">TTS</a></li></ul><p>聊天与 embedding 在 <strong>Models</strong> 页管理;语音模型在 TTS 流程里单走。</p><hr><h2 id="供应商基础" tabindex="-1">供应商基础 <a class="header-anchor" href="#供应商基础" aria-label="Permalink to &quot;供应商基础&quot;"></a></h2><p><strong>供应商</strong>里存的是某一类上游的连法,例如:</p><ul><li>协议(<code>client_type</code></li><li>需要时的 base URL</li><li>API Key 或 OAuth 等凭据</li></ul><p>常见有 OpenAI 兼容站、Anthropic、Google、Codex、GitHub Copilot 等。</p><h3 id="新建供应商" tabindex="-1">新建供应商 <a class="header-anchor" href="#新建供应商" aria-label="Permalink to &quot;新建供应商&quot;"></a></h3><ol><li>侧栏打开 <strong>Models</strong>。</li><li>点 <strong>Add Provider</strong>。</li><li>按表单填完保存。</li></ol><p>常用字段:</p><table tabindex="0"><thead><tr><th>字段</th><th>说明</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>展示名,如 <code>OpenAI</code>。</td></tr><tr><td><strong>Client Type</strong></td><td>本供应商用的协议。</td></tr><tr><td><strong>Base URL</strong></td><td>部分协议必填的根地址。</td></tr><tr><td><strong>API Key</strong></td><td>走密钥时填。</td></tr></tbody></table><h3 id="客户端类型" tabindex="-1">客户端类型 <a class="header-anchor" href="#客户端类型" aria-label="Permalink to &quot;客户端类型&quot;"></a></h3><table tabindex="0"><thead><tr><th>Client Type</th><th>常见用途</th></tr></thead><tbody><tr><td><code>openai-responses</code></td><td>OpenAI Responses 风格</td></tr><tr><td><code>openai-completions</code></td><td>Chat Completions 兼容</td></tr><tr><td><code>anthropic-messages</code></td><td>Anthropic Messages</td></tr><tr><td><code>google-generative-ai</code></td><td>Google Gemini</td></tr><tr><td><code>openai-codex</code></td><td>Codex / ChatGPT 那套,OAuth</td></tr><tr><td><code>github-copilot</code></td><td>Copilot,设备码 OAuth</td></tr><tr><td><code>edge-speech</code></td><td>仅朗读,走 Edge</td></tr></tbody></table><p><code>edge-speech</code> 不能当主聊天用,请走 <a href="/zh/tts-providers/">TTS 提供方</a>。</p><hr><h2 id="走-oauth-的供应商" tabindex="-1">走 OAuth 的供应商 <a class="header-anchor" href="#走-oauth-的供应商" aria-label="Permalink to &quot;走 OAuth 的供应商&quot;"></a></h2><p>多数类型用普通 API Key。<code>openai-codex</code> 和 <code>github-copilot</code> 例外。</p><h3 id="openai-codex" tabindex="-1">OpenAI Codex <a class="header-anchor" href="#openai-codex" aria-label="Permalink to &quot;OpenAI Codex&quot;"></a></h3><ul><li>类型选 <code>openai-codex</code></li><li>在供应商表单里走 OAuth,不填普通 key</li><li>预置会指向 <code>https://chatgpt.com/backend-api</code></li></ul><p>偏写代码、走 Codex 那套时合适。</p><h3 id="github-copilot" tabindex="-1">GitHub Copilot <a class="header-anchor" href="#github-copilot" aria-label="Permalink to &quot;GitHub Copilot&quot;"></a></h3><ul><li>类型 <code>github-copilot</code></li><li><strong>设备码</strong> 授权</li><li>等待时界面会给验证 URL 和用户码</li><li>结束后存 GitHub 侧 token</li></ul><p>你本来就有 Copilot 时,可复用进 Memoh。</p><hr><h2 id="导入模型" tabindex="-1">导入模型 <a class="header-anchor" href="#导入模型" aria-label="Permalink to &quot;导入模型&quot;"></a></h2><p>建完供应商后可以导入或手加模型。常见:选中供应商 → <strong>Import Models</strong>(若上游有目录)→ 勾要保存的。已知上游 id 时也可手填。</p><hr><h2 id="模型类型" tabindex="-1">模型类型 <a class="header-anchor" href="#模型类型" aria-label="Permalink to &quot;模型类型&quot;"></a></h2><table tabindex="0"><thead><tr><th>类型</th><th>用途</th></tr></thead><tbody><tr><td><code>chat</code></td><td>对话、工具、推理、文生图等</td></tr><tr><td><code>embedding</code></td><td>向量化、记忆检索</td></tr><tr><td><code>speech</code></td><td>朗读,挂在 TTS</td></tr></tbody></table><p><strong>Models</strong> 页主要管 chat / embeddingspeech 在 <a href="/zh/tts-providers/">TTS</a>。</p><hr><h2 id="聊天模型上要注意的项" tabindex="-1">聊天模型上要注意的项 <a class="header-anchor" href="#聊天模型上要注意的项" aria-label="Permalink to &quot;聊天模型上要注意的项&quot;"></a></h2><table tabindex="0"><thead><tr><th>字段</th><th>说明</th></tr></thead><tbody><tr><td><strong>Model ID</strong></td><td>上游真实 id,如 <code>gpt-4o</code>。</td></tr><tr><td><strong>Name</strong></td><td>界面展示名。</td></tr><tr><td><strong>Compatibilities</strong></td><td>如 <code>vision</code>、<code>tool-call</code>、<code>image-output</code>、<code>reasoning</code>。</td></tr><tr><td><strong>Context Window</strong></td><td>粗算上下文上限。</td></tr></tbody></table><h3 id="兼容性" tabindex="-1">兼容性 <a class="header-anchor" href="#兼容性" aria-label="Permalink to &quot;兼容性&quot;"></a></h3><table tabindex="0"><thead><tr><th>标记</th><th>含义</th></tr></thead><tbody><tr><td><code>vision</code></td><td>能吃图</td></tr><tr><td><code>tool-call</code></td><td>能调工具</td></tr><tr><td><code>image-output</code></td><td>能出图</td></tr><tr><td><code>reasoning</code></td><td>有显式推理/档位</td></tr></tbody></table><p>有推理时可能还带 <code>reasoning_efforts</code><code>none</code>、<code>low</code>…<code>xhigh</code> 等。</p><h3 id="context-window" tabindex="-1"><code>context_window</code> <a class="header-anchor" href="#context-window" aria-label="Permalink to &quot;`context_window`&quot;"></a></h3><p>Memoh 用来:</p><ul><li>在网页上算当前会话占了多少上下文</li><li>驱动 <code>/status</code> 等</li><li>判断是否逼近上限</li><li>决定何时需要 <a href="/zh/getting-started/compaction.html">会话上下文压缩</a></li></ul><p>不填也能用,但<strong>百分比</strong>会没法精确给。</p><h3 id="文生图模型" tabindex="-1">文生图模型 <a class="header-anchor" href="#文生图模型" aria-label="Permalink to &quot;文生图模型&quot;"></a></h3><p>机器人上可单挂 <strong>Image Generation Model</strong>,须是带 <code>image-output</code> 的 chat 模型。需要时与默认聊天模型分开。</p><hr><h2 id="embedding-模型" tabindex="-1">Embedding 模型 <a class="header-anchor" href="#embedding-模型" aria-label="Permalink to &quot;Embedding 模型&quot;"></a></h2><p>给语义索引用。必填如 <strong>Dimensions</strong>(向量维数,如 1536)。和记忆或其它向量检索能力绑在一起用。</p><hr><h2 id="语音模型" tabindex="-1">语音模型 <a class="header-anchor" href="#语音模型" aria-label="Permalink to &quot;语音模型&quot;"></a></h2><p>在 <a href="/zh/tts-providers/">TTS 提供方</a> 配,不跟普通 chat 供应商混流。例如 Edge TTS 走 <code>edge-speech</code>。语音还有音色、格式、语速、音高,和 chat/embedding 不是一路设置。</p><hr><h2 id="怎么记省事" tabindex="-1">怎么记省事 <a class="header-anchor" href="#怎么记省事" aria-label="Permalink to &quot;怎么记省事&quot;"></a></h2><p>对多数机器人,可以分三条线想:</p><ul><li><strong>Chat</strong>:日常说人话</li><li><strong>Embedding</strong>:记忆</li><li><strong>Speech / 生图模型</strong>:边能力</li></ul><p>不必强行一模型全包。</p><hr><h2 id="接下来" tabindex="-1">接下来 <a class="header-anchor" href="#接下来" aria-label="Permalink to &quot;接下来&quot;"></a></h2><ul><li>给机器人绑聊天、生图、浏览器、记忆、朗读等:<a href="/zh/getting-started/bot.html">机器人</a></li><li>配语音提供方与语音模型:<a href="/zh/tts-providers/">TTS 提供方</a></li></ul>',58)])])}const b=e(r,[["render",i]]);export{g as __pageData,b as default};