mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
import{_ as t,o,c as d,ag as a}from"./chunks/framework.CAXxHpAX.js";const m=JSON.parse('{"title":"Providers And Models","description":"","frontmatter":{},"headers":[],"relativePath":"getting-started/provider-and-model.md","filePath":"getting-started/provider-and-model.md","lastUpdated":1776332711000}'),i={name:"getting-started/provider-and-model.md"};function r(s,e,n,l,c,h){return o(),d("div",null,[...e[0]||(e[0]=[a('<h1 id="providers-and-models" tabindex="-1">Providers And Models <a class="header-anchor" href="#providers-and-models" aria-label="Permalink to "Providers And Models""></a></h1><p>To use Memoh effectively, you usually configure:</p><ul><li>one or more <strong>providers</strong> that define how Memoh talks to upstream APIs</li><li>one or more <strong>models</strong> under those providers</li><li>optional <strong>speech providers</strong> if you want text-to-speech</li></ul><p>The Web UI manages chat and embedding providers/models from the <strong>Models</strong> page. Speech models are managed separately from <a href="/tts-providers/">TTS Providers</a>.</p><hr><h2 id="provider-basics" tabindex="-1">Provider Basics <a class="header-anchor" href="#provider-basics" aria-label="Permalink to "Provider Basics""></a></h2><p>A <strong>provider</strong> stores connection information for one upstream service, such as:</p><ul><li>the API protocol (<code>client_type</code>)</li><li>the base URL if the protocol needs one</li><li>credentials such as an API key or OAuth token</li></ul><p>Typical examples include OpenAI-compatible endpoints, Anthropic, Google Gemini, OpenAI Codex, and GitHub Copilot.</p><h3 id="creating-a-provider" tabindex="-1">Creating A Provider <a class="header-anchor" href="#creating-a-provider" aria-label="Permalink to "Creating A Provider""></a></h3><ol><li>Open the <strong>Models</strong> page from the settings sidebar.</li><li>Click <strong>Add Provider</strong>.</li><li>Fill in the provider form.</li><li>Save the provider.</li></ol><p>Common fields:</p><table tabindex="0"><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Friendly display name, such as <code>OpenAI</code> or <code>Copilot</code>.</td></tr><tr><td><strong>Client Type</strong></td><td>API protocol used by this provider.</td></tr><tr><td><strong>Base URL</strong></td><td>Root API endpoint, when required by the selected client type.</td></tr><tr><td><strong>API Key</strong></td><td>Token-based authentication, when the client type uses direct credentials.</td></tr></tbody></table><h3 id="client-types" tabindex="-1">Client Types <a class="header-anchor" href="#client-types" aria-label="Permalink to "Client Types""></a></h3><p>Memoh currently supports these client types:</p><table tabindex="0"><thead><tr><th>Client Type</th><th>Typical Use</th></tr></thead><tbody><tr><td><code>openai-responses</code></td><td>OpenAI Responses API style providers</td></tr><tr><td><code>openai-completions</code></td><td>OpenAI Chat Completions compatible providers</td></tr><tr><td><code>anthropic-messages</code></td><td>Anthropic Messages API</td></tr><tr><td><code>google-generative-ai</code></td><td>Google Gemini API</td></tr><tr><td><code>openai-codex</code></td><td>OpenAI Codex / ChatGPT-backed coding workflow with OAuth</td></tr><tr><td><code>github-copilot</code></td><td>GitHub Copilot with device OAuth</td></tr><tr><td><code>edge-speech</code></td><td>Speech-only provider type for Microsoft Edge Read Aloud</td></tr></tbody></table><p><code>edge-speech</code> is for speech synthesis, not for chat. Configure it through <a href="/tts-providers/">TTS Providers</a>, not as your main chat provider.</p><hr><h2 id="oauth-based-providers" tabindex="-1">OAuth-Based Providers <a class="header-anchor" href="#oauth-based-providers" aria-label="Permalink to "OAuth-Based Providers""></a></h2><p>Most provider types use a normal API key. Two notable exceptions are <code>openai-codex</code> and <code>github-copilot</code>.</p><h3 id="openai-codex" tabindex="-1">OpenAI Codex <a class="header-anchor" href="#openai-codex" aria-label="Permalink to "OpenAI Codex""></a></h3><ul><li>Uses the <code>openai-codex</code> client type</li><li>Authenticates through the provider form's OAuth flow instead of a normal API key workflow</li><li>The bundled preset points at <code>https://chatgpt.com/backend-api</code></li></ul><p>This is a good fit when you want Codex-style model access for coding-oriented workflows.</p><h3 id="github-copilot" tabindex="-1">GitHub Copilot <a class="header-anchor" href="#github-copilot" aria-label="Permalink to "GitHub Copilot""></a></h3><ul><li>Uses the <code>github-copilot</code> client type</li><li>Uses <strong>device authorization</strong></li><li>The provider form shows a verification URL and a user code while authorization is pending</li><li>After authorization completes, the provider stores the linked GitHub account token</li></ul><p>GitHub Copilot is especially useful if you already have access to Copilot-backed chat and embedding models and want to reuse that access from Memoh.</p><hr><h2 id="importing-models" tabindex="-1">Importing Models <a class="header-anchor" href="#importing-models" aria-label="Permalink to "Importing Models""></a></h2><p>After creating a provider, you can import or add models under it.</p><p>Typical flow:</p><ol><li>Select the provider.</li><li>Click <strong>Import Models</strong> if the provider can expose a model catalog.</li><li>Choose the models you want to save into Memoh.</li></ol><p>You can also add models manually when you already know the upstream model ID.</p><hr><h2 id="model-types" tabindex="-1">Model Types <a class="header-anchor" href="#model-types" aria-label="Permalink to "Model Types""></a></h2><p>Memoh distinguishes three model types:</p><table tabindex="0"><thead><tr><th>Type</th><th>Purpose</th></tr></thead><tbody><tr><td><code>chat</code></td><td>Main LLMs for conversation, tool use, reasoning, and image generation</td></tr><tr><td><code>embedding</code></td><td>Vector models for memory and retrieval</td></tr><tr><td><code>speech</code></td><td>Text-to-speech models used by TTS providers</td></tr></tbody></table><p>Important distinction:</p><ul><li>The <strong>Models</strong> page is primarily where you manage <code>chat</code> and <code>embedding</code> models.</li><li><code>speech</code> models are exposed through <a href="/tts-providers/">TTS Providers</a>.</li></ul><hr><h2 id="chat-model-configuration" tabindex="-1">Chat Model Configuration <a class="header-anchor" href="#chat-model-configuration" aria-label="Permalink to "Chat Model Configuration""></a></h2><p>When adding a chat model, the most important fields are:</p><table tabindex="0"><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Model ID</strong></td><td>Exact upstream identifier, such as <code>gpt-4o</code> or <code>claude-sonnet-4.6</code>.</td></tr><tr><td><strong>Name</strong></td><td>Friendly display name shown in the UI.</td></tr><tr><td><strong>Compatibilities</strong></td><td>Feature flags such as <code>vision</code>, <code>tool-call</code>, <code>image-output</code>, and <code>reasoning</code>.</td></tr><tr><td><strong>Context Window</strong></td><td>Approximate maximum context budget for the model.</td></tr></tbody></table><h3 id="compatibilities" tabindex="-1">Compatibilities <a class="header-anchor" href="#compatibilities" aria-label="Permalink to "Compatibilities""></a></h3><p>Memoh uses compatibility flags to decide which features a model can safely power:</p><table tabindex="0"><thead><tr><th>Compatibility</th><th>Meaning</th></tr></thead><tbody><tr><td><code>vision</code></td><td>Model can accept images as input</td></tr><tr><td><code>tool-call</code></td><td>Model can call tools</td></tr><tr><td><code>image-output</code></td><td>Model can generate images</td></tr><tr><td><code>reasoning</code></td><td>Model exposes explicit reasoning modes / effort levels</td></tr></tbody></table><p>If a model supports reasoning, it may also declare <code>reasoning_efforts</code> such as <code>none</code>, <code>low</code>, <code>medium</code>, <code>high</code>, or <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 "`context_window`""></a></h3><p><code>context_window</code> is important because Memoh uses it to:</p><ul><li>calculate session context usage in the Web UI</li><li>power <code>/status</code> output</li><li>decide when a session is approaching its prompt limit</li><li>guide <a href="/getting-started/compaction.html">Context Compaction</a></li></ul><p>If you leave <code>context_window</code> empty, the model can still be used, but Memoh cannot show an exact usage percentage for that model.</p><h3 id="image-generation-models" tabindex="-1">Image Generation Models <a class="header-anchor" href="#image-generation-models" aria-label="Permalink to "Image Generation Models""></a></h3><p>Memoh now lets you assign an <strong>Image Generation Model</strong> to a bot. This model must be a chat model whose compatibilities include <code>image-output</code>.</p><p>That keeps image generation separate from your default chat model when needed.</p><hr><h2 id="embedding-models" tabindex="-1">Embedding Models <a class="header-anchor" href="#embedding-models" aria-label="Permalink to "Embedding Models""></a></h2><p>Embedding models are used for semantic indexing and retrieval.</p><p>The required field is:</p><table tabindex="0"><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Dimensions</strong></td><td>Vector size for the embedding output, such as <code>1536</code>.</td></tr></tbody></table><p>Use embedding models with memory providers or any feature that relies on vector search.</p><hr><h2 id="speech-models" tabindex="-1">Speech Models <a class="header-anchor" href="#speech-models" aria-label="Permalink to "Speech Models""></a></h2><p>Speech models are managed from <a href="/tts-providers/">TTS Providers</a>, not from the standard chat provider flow.</p><p>Current built-in example:</p><ul><li><strong>Edge TTS</strong> via <code>edge-speech</code></li></ul><p>This separation matters because speech models have voice, format, speed, and pitch settings that do not apply to chat or embedding models.</p><hr><h2 id="recommended-mental-model" tabindex="-1">Recommended Mental Model <a class="header-anchor" href="#recommended-mental-model" aria-label="Permalink to "Recommended Mental Model""></a></h2><p>For most bots, think in terms of three parallel model roles:</p><ul><li><strong>Chat model</strong> for normal conversations</li><li><strong>Embedding model</strong> for memory search</li><li><strong>Speech / image models</strong> for side capabilities such as TTS and image generation</li></ul><p>You do not need to force one model to do everything.</p><hr><h2 id="next-steps" tabindex="-1">Next Steps <a class="header-anchor" href="#next-steps" aria-label="Permalink to "Next Steps""></a></h2><ul><li>To assign chat, image, browser, memory, and TTS settings to a bot, see <a href="/getting-started/bot.html">Bot Management</a>.</li><li>To configure speech providers and speech models, see <a href="/tts-providers/">TTS Providers</a>.</li></ul>',73)])])}const u=t(i,[["render",r]]);export{m as __pageData,u as default};
|