</code></pre></details><details><summary>Install with pack manager</summary><p>Open shell under the plugin directory of nonebot2, input corresponding command according to your pack manager.</p><details><summary>pip</summary><pre><code>pip install nonebot-plugin-marshoai
</code></pre></details><p>Open the <code>pyproject.toml</code> file under nonebot2's root directory, Add to<code>[tool.nonebot]</code>.</p><pre><code>plugins = ["nonebot_plugin_marshoai"]
</code></pre></details><h2id="🤖-get-token-github-models"tabindex="-1">🤖 Get token(GitHub Models) <aclass="header-anchor"href="#🤖-get-token-github-models"aria-label="Permalink to "🤖 Get token(GitHub Models)""></a></h2><ul><li>Create new <ahref="https://github.com/settings/tokens/new"target="_blank"rel="noreferrer">personal access token</a>,<strong>Don't need any permissions</strong>.</li><li>Copy the new token, add to the <code>.env</code> file's <code>marshoai_token</code> option.</li></ul><divclass="warning custom-block"><pclass="custom-block-title">WARNING</p><p>GitHub Models API comes with significant limitations and is therefore not recommended for use. For better alternatives, it's suggested to adjust the configuration <code>MARSHOAI_AZURE_ENDPOINT</code> to use other service providers' models instead.</p></div><h2id="🎉-usage"tabindex="-1">🎉 Usage <aclass="header-anchor"href="#🎉-usage"aria-label="Permalink to "🎉 Usage""></a></h2><p>End <code>marsho</code> in order to get direction for use(If you configured the custom command, please use the configured one).</p><h4id="👉-double-click-avatar"tabindex="-1">👉 Double click avatar <aclass="header-anchor"href="#👉-double-click-avatar"aria-label="Permalink to "👉 Double click avatar""></a></h4><p>When nonebot linked to OneBot v11 adapter, can recieve double click and response to it. More detail in the <code>MARSHOAI_POKE_SUFFIX</code> option.</p><h2id="🛠️-marshotools-deprecated"tabindex="-1">🛠️ <s>MarshoTools</s> (Deprecated) <aclass="header-anchor"href="#🛠️-marshotools-deprecated"aria-label="Permalink to "🛠️ ~~MarshoTools~~ (Deprecated)""></a></h2><p>MarshoTools is a feature added in <code>v0.5.0</code>, support loading external function library to provide Function Call for Marsho.</p><h2id="🧩-marsho-plugin"tabindex="-1">🧩 Marsho Plugin <aclass="header-anchor"href="#🧩-marsho-plugin"aria-label="Permalink to "🧩 Marsho Plugin""></a></h2><p>Marsho Plugin is a feature added in <code>v1.0.0</code>, replacing the old MarshoTools feature. <ahref="https://marsho.liteyuki.icu/dev/extension"target="_blank"rel="noreferrer">Documentation</a></p><h2id="👍-praise-list"tabindex="-1">👍 Praise list <aclass="header-anchor"href="#👍-praise-list"aria-label="Permalink to "👍 Praise list""></a></h2><p>Praise list stored in the <code>praises.json</code> in plugin directory(This directory will putput to log when Bot start), it'll automatically generate when option is <code>true</code>, include character name and advantage two basic data.</p><p>The character stored in it would be “know” and “like” by Marsho.</p><p>It's structure is similar to:</p><divclass="language-json vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">json</span><preclass="shiki shiki-themes github-light github-dark vp-code"tabindex="0"><code><spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2id="⚙️-configurable-options"tabindex="-1">⚙️ Configurable options <aclass="header-anchor"href="#⚙️-configurable-options"aria-label="Permalink to "⚙️ Configurable options""></a></h2><p>Add options in the <code>.env</code> file from the diagram below in nonebot2 project.</p><h4id="plugin-behaviour"tabindex="-1">plugin behaviour <aclass="header-anchor"href="#plugin-behaviour"aria-label="Permalink to "plugin behaviour""></a></h4><tabletabindex="0"><thead><tr><th>Option</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>MARSHOAI_USE_YAML_CONFIG</td><td><code>bool</code></td><td><code>false</code></td><td>Use YAML config format</td></tr><tr><td>MARSHOAI_DEVMODE</td><td><code>bool</code></td><td><code>true</code></td><td>Turn on Development Mode or not</td></tr></tbody></table><h4id="marsho-usage"tabindex="-1">Marsho usage <aclass="header-anchor"href="#marsho-usage"aria-label="Permalink to "Marsho usage""></a></h4><tabletabindex="0"><thead><tr><th>Option</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>MARSHOAI_DEFAULT_NAME</td><td><code>str</code></td><td><code>marsho</code></td><td>Command to call Marsho</td></tr><tr><td>MARSHOAI_ALIASES</td><td><code>set[str]</code></td><td><code>list["小棉"]</code></td><td>Other name(Alias) to call Marsho</td></tr><tr><td>MARSHOAI_AT</td><td><code>bool</code></td><td><code>false</code></td><td>Call by @ or not</td></tr><tr><td>MARSHOAI_MAIN_COLOUR</td><td><code>str</code></td><td><code>FEABA9</code></td><td>Theme color, used by some tools and features</td></tr></tbody></table><h4id="ai-call"tabindex="-1">AI call <aclass="header-anchor"href="#ai-call"aria-label="Permalink to "AI call""></a></h4><tabletabindex="0"><thead><tr><th>Option</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>MARSHOAI_TOKEN</td><td><code>str</code></td><td></td><td>The token needed to call AI API</td></tr><tr><td>MARSHOAI_DEFAULT_MODEL</td><td><code>str</code></td><td><code>gpt-4o-mini</code></td><td>The default model of Marsho</td></tr><tr><td>MARSHOAI_PROMPT</td><td><code>str</code></td><td>Catgirl Marsho's character prompt</td><td>Marsho's basic system prompt <strong>※Some models(o1 and so on) don't support it</strong></td></tr><tr><td>MARSHOAI_ADDITIONAL_PROMPT</td><td><code>str</code></td><td></td><td>Marsho's external system prompt</td></tr><tr><td>MARSHOAI_ENFORCE_NICKNAME</td><td><code>bool</code></td><td><code>true</code></td><td>Enforce user to set nickname or not</td></tr><tr><td>MARSHOAI_POKE_SUFFIX</td><td><code>str</code></td><td><code>揉了揉你的猫耳</code></td><td>When double click Marsho who connected to OneBot adapter, the chat content. When it's empty string, double click function is off. Such as, the default content is <code>*[昵称]揉了揉你的猫耳。</code></td></tr><tr><td>MARSHOAI_AZURE_ENDPOINT</td><td><code>str</code></td><td><code>https://models.inference.ai.azure.com</code></td><td>OpenAI standard API</td></tr><tr><td>MARSHOAI_TEMPERATURE</td><td><code>float</code></td><td><code>null</code></td><td>temperature parameter</td></tr><tr><td>MARSHOAI_TOP_P</td><td><code>float</code></td><td><code>null</code></td><td>Nucleus Sampling parameter</td></tr><tr><td>MARSHOAI_MAX_TOKENS</td><td><code>int</code></td><td><code>null</code></td><td>Max token number</td></tr><tr><td>MARSHOAI_ADDITIONAL_IMAGE_MODELS</td><td><code>list</code></td><td><code>[]</code></td><td>External image-support model list, such as <code>hunyuan-vision</code></td></tr><tr><td>MARSHOAI_NICKNAME_LIMIT</td><td><code>int</code></td><td><code>16</code></td><td>Limit for nickname length</td></tr><tr><td>MARSHOAI_TIMEOUT</td><td><code>float</code></td><td><code>50</code></td><td>AI request timeout (seconds)</td></tr></tbody></table><h4id="feature-switches"tabindex="-1">Feature Switches <acl