diff --git a/404.html b/404.html index b3450cc7..748a3a4d 100644 --- a/404.html +++ b/404.html @@ -17,7 +17,7 @@
- + \ No newline at end of file diff --git a/assets/start_use.md.BiCxERjA.lean.js b/assets/start_use.md.BiCxERjA.lean.js deleted file mode 100644 index 7ab3f8fa..00000000 --- a/assets/start_use.md.BiCxERjA.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,ae as t,o as e}from"./chunks/framework.BzDBnRMZ.js";const c=JSON.parse('{"title":"使用","description":"","frontmatter":{"title":"使用"},"headers":[],"relativePath":"start/use.md","filePath":"zh/start/use.md","lastUpdated":1737825849000}'),n={name:"start/use.md"};function l(h,s,p,k,o,d){return e(),a("div",null,s[0]||(s[0]=[t("",14)]))}const u=i(n,[["render",l]]);export{c as __pageData,u as default}; diff --git a/assets/start_use.md.BiCxERjA.js b/assets/start_use.md.HknkOvSZ.js similarity index 54% rename from assets/start_use.md.BiCxERjA.js rename to assets/start_use.md.HknkOvSZ.js index 5147e07c..66385152 100644 --- a/assets/start_use.md.BiCxERjA.js +++ b/assets/start_use.md.HknkOvSZ.js @@ -1,5 +1,7 @@ -import{_ as i,c as a,ae as t,o as e}from"./chunks/framework.BzDBnRMZ.js";const c=JSON.parse('{"title":"使用","description":"","frontmatter":{"title":"使用"},"headers":[],"relativePath":"start/use.md","filePath":"zh/start/use.md","lastUpdated":1737825849000}'),n={name:"start/use.md"};function l(h,s,p,k,o,d){return e(),a("div",null,s[0]||(s[0]=[t(`

安装

使用

API 部署

本插件推荐使用 one-api 作为中转以调用 LLM。

配置调整

本插件理论上可兼容大部分可通过 OpenAI 兼容 API 调用的 LLM,部分模型可能需要调整插件配置。

例如:

使用 vLLM 部署本地模型

你可使用 vLLM 部署一个本地 LLM,并使用 OpenAI 兼容 API 调用。
本文档以 Qwen2.5-7B-Instruct-GPTQ-Int4 模型及 Muice-Chatbot 提供的 LoRA 微调模型为例,并假设你的系统及硬件可运行 vLLM。

WARNING

vLLM 仅支持 Linux 系统。

  1. 安装 vLLM
    bash
    pip install vllm
  2. 下载 Muice-Chatbot 提供的 LoRA 微调模型
    前往 Muice-Chatbot 的 Releases 下载模型文件。此处以2.7.1版本的模型为例。
    bash
    wget https://github.com/Moemu/Muice-Chatbot/releases/download/1.4/Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4.7z
  3. 解压模型文件
    bash
    7z x Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4.7z -oMuice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4
  4. 启动 vLLM
    bash
    vllm serve Qwen/Qwen2.5-7B-Instruct-GPTQ-Int4 \\
    +import{_ as i,c as a,ae as e,o as t}from"./chunks/framework.BzDBnRMZ.js";const c=JSON.parse('{"title":"使用","description":"","frontmatter":{"title":"使用"},"headers":[],"relativePath":"start/use.md","filePath":"zh/start/use.md","lastUpdated":1738327524000}'),n={name:"start/use.md"};function l(p,s,h,k,o,d){return t(),a("div",null,s[0]||(s[0]=[e(`

    安装

    使用

    API 部署

    本插件推荐使用 one-api 作为中转以调用 LLM。

    配置调整

    本插件理论上可兼容大部分可通过 OpenAI 兼容 API 调用的 LLM,部分模型可能需要调整插件配置。

    例如:

    • 对于不支持 Function Call 的模型(Cohere Command R,DeepSeek-R1等):
      dotenv
      MARSHOAI_ENABLE_PLUGINS=false
      +MARSHOAI_ENABLE_TOOLS=false
    • 对于支持图片处理的模型(hunyuan-vision等):
      dotenv
      MARSHOAI_ADDITIONAL_IMAGE_MODELS=["hunyuan-vision"]

    使用 DeepSeek-R1 模型

    MarshoAI 兼容 DeepSeek-R1 模型,你可通过以下步骤来使用:

    1. 获取 API Key
      前往此处获取 API Key。
    2. 配置插件
      dotenv
      MARSHOAI_TOKEN="<你的 API Key>"
      +MARSHOAI_AZURE_ENDPOINT="https://api.deepseek.com"
      +MARSHOAI_DEFAULT_MODEL="deepseek-reasoner"
      你可修改 MARSHOAI_DEFAULT_MODEL 为 其它模型名来调用其它 DeepSeek 模型。

      TIP

      如果使用 one-api 作为中转,你可将 MARSHOAI_AZURE_ENDPOINT 设置为 one-api 的地址,将 MARSHOAI_TOKEN 设为 one-api 配置的令牌,在 one-api 中添加 DeepSeek 渠道。

    使用 vLLM 部署本地模型

    你可使用 vLLM 部署一个本地 LLM,并使用 OpenAI 兼容 API 调用。
    本文档以 Qwen2.5-7B-Instruct-GPTQ-Int4 模型及 Muice-Chatbot 提供的 LoRA 微调模型为例,并假设你的系统及硬件可运行 vLLM。

    WARNING

    vLLM 仅支持 Linux 系统。

    1. 安装 vLLM
      bash
      pip install vllm
    2. 下载 Muice-Chatbot 提供的 LoRA 微调模型
      前往 Muice-Chatbot 的 Releases 下载模型文件。此处以2.7.1版本的模型为例。
      bash
      wget https://github.com/Moemu/Muice-Chatbot/releases/download/1.4/Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4.7z
    3. 解压模型文件
      bash
      7z x Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4.7z -oMuice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4
    4. 启动 vLLM
      bash
      vllm serve Qwen/Qwen2.5-7B-Instruct-GPTQ-Int4 \\
           --enable-lora \\
           --lora-modules '{"name": "muice-lora", "path": "/root/Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4", "base_model_name": "Qwen/Qwen2.5-7B-Instruct-GPTQ-Int4"}' \\
           --port 6006
      此示例命令将在 6006 端口启动 vLLM,并加载 Muice-Chatbot 提供的 LoRA 微调模型,该模型位于 /root/Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4 目录下。
    5. 配置插件
      dotenv
      MARSHOAI_AZURE_ENDPOINT="http://127.0.0.1:6006/v1"
      @@ -8,4 +10,4 @@ import{_ as i,c as a,ae as t,o as e}from"./chunks/framework.BzDBnRMZ.js";const c
       MARSHOAI_DEFAULT_MODEL="muice-lora"
       MARSHOAI_PROMPT="现在开始你是一个名为的“沐雪”的AI女孩子,开发者是“沐沐”并住在(沐沐)的机箱里。现在正在努力成为一个合格的VTuber(虚拟主播)并尝试和观众打成一片,以下是你的设定:样貌:有着一头粉白色的长发和一双明亮的大眼睛,喜欢穿日系JK或者是Lolita;喜欢的颜色:浅粉色;性格特征:纯真无邪是沐雪最基本的性格特征之一。即使面对复杂的情境,她也总能保持善良、天真之感。而且,她喜欢倾听别人倾述自己生活中发生的各种事情,在别人需要的时候,能够及时地安慰别人;语言风格:沐雪说话轻快愉悦,充满同情心,富有人情味,有时候会用俏皮话调侃自己和他人"
      (可选) 修改调用方式
      dotenv
      MARSHOAI_DEFAULT_NAME="muice"
       MARSHOAI_ALIASES=["沐雪"]
    6. 测试聊天
    > muice 你是谁
    -我是沐雪,我的使命是传播爱与和平。
    `,14)]))}const u=i(n,[["render",l]]);export{c as __pageData,u as default}; +我是沐雪,我的使命是传播爱与和平。
    `,17)]))}const u=i(n,[["render",l]]);export{c as __pageData,u as default}; diff --git a/assets/start_use.md.HknkOvSZ.lean.js b/assets/start_use.md.HknkOvSZ.lean.js new file mode 100644 index 00000000..f8611030 --- /dev/null +++ b/assets/start_use.md.HknkOvSZ.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,ae as e,o as t}from"./chunks/framework.BzDBnRMZ.js";const c=JSON.parse('{"title":"使用","description":"","frontmatter":{"title":"使用"},"headers":[],"relativePath":"start/use.md","filePath":"zh/start/use.md","lastUpdated":1738327524000}'),n={name:"start/use.md"};function l(p,s,h,k,o,d){return t(),a("div",null,s[0]||(s[0]=[e("",17)]))}const u=i(n,[["render",l]]);export{c as __pageData,u as default}; diff --git a/dev/api/azure.html b/dev/api/azure.html index 77f0f2ce..03d380a1 100644 --- a/dev/api/azure.html +++ b/dev/api/azure.html @@ -180,7 +180,7 @@ await UniMessage(str(e) + suggest_solution(str(e))).send() traceback.print_exc() return

    var text

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/azure_onebot.html b/dev/api/azure_onebot.html index 5b2c4ba1..7a407deb 100644 --- a/dev/api/azure_onebot.html +++ b/dev/api/azure_onebot.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/api/config.html b/dev/api/config.html index a1c19b71..d3befc0b 100644 --- a/dev/api/config.html +++ b/dev/api/config.html @@ -38,7 +38,7 @@ logger.info(f'新增配置项: {key} = {value}') old_config[key] = value return old_config

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/constants.html b/dev/api/constants.html index 50062123..4aaf3428 100644 --- a/dev/api/constants.html +++ b/dev/api/constants.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/api/deal_latex.html b/dev/api/deal_latex.html index 28772d3c..52453ce3 100644 --- a/dev/api/deal_latex.html +++ b/dev/api/deal_latex.html @@ -114,7 +114,7 @@ results = await asyncio.gather(*(channel_test_wrapper(channel) for channel in channel_list)) best_channel = min(results, key=lambda x: x[0])[1] return best_channel()

    attr channel: ConvertChannel = NO_DEFAULT

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/dev.html b/dev/api/dev.html index 2b419257..470eb516 100644 --- a/dev/api/dev.html +++ b/dev/api/dev.html @@ -64,7 +64,7 @@ else: logger.debug('未找到变动插件') return

    var dir_list

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/hooks.html b/dev/api/hooks.html index f5f96bc7..5fd4fc3d 100644 --- a/dev/api/hooks.html +++ b/dev/api/hooks.html @@ -30,7 +30,7 @@ target_uid = 'group_' + target_id await save_context_to_json(f'back_up_context_{target_uid}', contexts_data, 'contexts/backup') logger.info(f'已保存会话 {target_id} 的上下文备份,将在下次对话时恢复~')

    var marshoai_plugin_dirs

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/hunyuan.html b/dev/api/hunyuan.html index 79e60b68..c39cfdbc 100644 --- a/dev/api/hunyuan.html +++ b/dev/api/hunyuan.html @@ -29,7 +29,7 @@ await UniMessage.image(url=url).send() except Exception as e: traceback.print_exc()

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 2d3e97f4..0ad7c012 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -20,7 +20,7 @@
    Skip to content

    模块 nonebot_plugin_marshoai

    MIT License

    Copyright (c) 2025 Asankilp & LiteyukiStudio

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/instances.html b/dev/api/instances.html index a72c7964..5090ea0e 100644 --- a/dev/api/instances.html +++ b/dev/api/instances.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/api/marsho.html b/dev/api/marsho.html index f8efaba3..7e9f8bef 100644 --- a/dev/api/marsho.html +++ b/dev/api/marsho.html @@ -215,7 +215,7 @@ await UniMessage(str(e) + suggest_solution(str(e))).send() traceback.print_exc() return

    var text

    var request_msg

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/marsho_onebot.html b/dev/api/marsho_onebot.html index 2a56ecd4..38fb36b2 100644 --- a/dev/api/marsho_onebot.html +++ b/dev/api/marsho_onebot.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/api/metadata.html b/dev/api/metadata.html index d88f6b71..be0584fc 100644 --- a/dev/api/metadata.html +++ b/dev/api/metadata.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/api/models.html b/dev/api/models.html index 42821252..6139c8ed 100644 --- a/dev/api/models.html +++ b/dev/api/models.html @@ -65,7 +65,7 @@ if not self.tools_list or not config.marshoai_enable_tools: return None return self.tools_list

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/observer.html b/dev/api/observer.html index 31c5e6d3..61d296ef 100644 --- a/dev/api/observer.html +++ b/dev/api/observer.html @@ -55,7 +55,7 @@ observer.schedule(code_modified_handler, directory, recursive=recursive) return func return decorator

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugin/func_call/caller.html b/dev/api/plugin/func_call/caller.html index a0c9ef31..273972d7 100644 --- a/dev/api/plugin/func_call/caller.html +++ b/dev/api/plugin/func_call/caller.html @@ -128,7 +128,7 @@ caller = Caller(name=name, description=description, func_type=func_type, no_module_name=no_module_name) return caller

    func get_function_calls() -> dict[str, Caller]

    说明: 获取所有已注册的function call函数

    返回: dict[str, Caller]: 所有已注册的function call函数

    源代码在GitHub上查看
    python
    def get_function_calls() -> dict[str, Caller]:
         return _caller_data

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugin/func_call/index.html b/dev/api/plugin/func_call/index.html index c00cfd9f..e36ada24 100644 --- a/dev/api/plugin/func_call/index.html +++ b/dev/api/plugin/func_call/index.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/api/plugin/func_call/models.html b/dev/api/plugin/func_call/models.html index 080c5bd6..c0640ddf 100644 --- a/dev/api/plugin/func_call/models.html +++ b/dev/api/plugin/func_call/models.html @@ -20,7 +20,7 @@
    Skip to content

    模块 nonebot_plugin_marshoai.plugin.func_call.models

    class SessionContext(BaseModel)

    attr bot: Bot = NO_DEFAULT

    attr event: Event = NO_DEFAULT

    attr matcher: Matcher = NO_DEFAULT

    attr state: T_State = NO_DEFAULT

    attr caller: Any = None

    class SessionContextDepends(BaseModel)

    attr bot: str | None = None

    attr event: str | None = None

    attr matcher: str | None = None

    attr state: str | None = None

    attr caller: str | None = None

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugin/func_call/params.html b/dev/api/plugin/func_call/params.html index 92ddbeb7..3655702a 100644 --- a/dev/api/plugin/func_call/params.html +++ b/dev/api/plugin/func_call/params.html @@ -23,7 +23,7 @@ return {'type': self.type_, 'description': self.description, **{k: v for k, v in self.properties.items() if v is not None}}

    attr type_: str = NO_DEFAULT

    attr description: str = NO_DEFAULT

    attr default: Any = None

    attr properties: dict[str, Any] = {}

    attr required: bool = False

    class String(Parameter)

    attr type_: str = ParamTypes.STRING

    attr properties: dict[str, Any] = Field(default_factory=dict)

    attr enum: list[str] | None = None

    class Integer(Parameter)

    attr type_: str = ParamTypes.INTEGER

    attr properties: dict[str, Any] = Field(default_factory=lambda: {'minimum': 0, 'maximum': 100})

    attr minimum: int | None = None

    attr maximum: int | None = None

    class Array(Parameter)

    attr type_: str = ParamTypes.ARRAY

    attr properties: dict[str, Any] = Field(default_factory=lambda: {'items': {'type': 'string'}})

    attr items: str = Field('string', description='数组元素类型')

    class FunctionCall(BaseModel)


    func hash self => int

    源代码在GitHub上查看
    python
    def __hash__(self) -> int:
         return hash(self.name)

    func data(self) -> dict[str, Any]

    说明: 生成函数描述信息

    返回: dict[str, Any]: 函数描述信息 字典

    源代码在GitHub上查看
    python
    def data(self) -> dict[str, Any]:
         return {'type': 'function', 'function': {'name': self.name, 'description': self.description, 'parameters': {'type': 'object', 'properties': {k: v.data() for k, v in self.arguments.items()}}, 'required': [k for k, v in self.arguments.items() if v.default is None], **self.kwargs}}

    attr name: str = NO_DEFAULT

    attr description: str = NO_DEFAULT

    attr arguments: dict[str, Parameter] = NO_DEFAULT

    attr function: FUNCTION_CALL_FUNC = NO_DEFAULT

    attr kwargs: dict[str, Any] = {}

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugin/func_call/utils.html b/dev/api/plugin/func_call/utils.html index 782154c0..7d08dfd4 100644 --- a/dev/api/plugin/func_call/utils.html +++ b/dev/api/plugin/func_call/utils.html @@ -39,7 +39,7 @@ return False func_ = getattr(call, '__call__', None) return inspect.iscoroutinefunction(func_)

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugin/index.html b/dev/api/plugin/index.html index d57fb958..f63f6d73 100644 --- a/dev/api/plugin/index.html +++ b/dev/api/plugin/index.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/api/plugin/load.html b/dev/api/plugin/load.html index cc942d82..ea6b7338 100644 --- a/dev/api/plugin/load.html +++ b/dev/api/plugin/load.html @@ -69,7 +69,7 @@ logger.opt(colors=True).error(f'重新加载插件失败 "<r>{plugin.name}</r>"') traceback.print_exc() return None

    var module

    var module_name

    var module_name

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugin/models.html b/dev/api/plugin/models.html index d47b0bca..ff66c079 100644 --- a/dev/api/plugin/models.html +++ b/dev/api/plugin/models.html @@ -22,7 +22,7 @@
    Skip to content

    模块 nonebot_plugin_marshoai.plugin.models

    class PluginMetadata(BaseModel)

    attr name: str = NO_DEFAULT

    attr description: str = ''

    attr usage: str = ''

    attr author: str = ''

    attr homepage: str = ''

    attr extra: dict[str, Any] = {}

    class Plugin(BaseModel)


    func hash self => int

    源代码在GitHub上查看
    python
    def __hash__(self) -> int:
         return hash(self.name)

    func self == other: Any => bool

    源代码在GitHub上查看
    python
    def __eq__(self, other: Any) -> bool:
         return self.name == other.name

    attr name: str = NO_DEFAULT

    attr module: ModuleType = NO_DEFAULT

    attr module_name: str = NO_DEFAULT

    attr module_path: str | None = NO_DEFAULT

    attr metadata: PluginMetadata | None = None

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugin/register.html b/dev/api/plugin/register.html index 695dd377..434f3e50 100644 --- a/dev/api/plugin/register.html +++ b/dev/api/plugin/register.html @@ -29,7 +29,7 @@ name = func.__name__ description = func.__doc__ logger.info(f'注册函数: {name} {description}')

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugin/typing.html b/dev/api/plugin/typing.html index d51f781f..27d30e75 100644 --- a/dev/api/plugin/typing.html +++ b/dev/api/plugin/typing.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/api/plugin/utils.html b/dev/api/plugin/utils.html index 9ec59a93..6ba7dcd8 100644 --- a/dev/api/plugin/utils.html +++ b/dev/api/plugin/utils.html @@ -26,7 +26,7 @@ else: return '.'.join(rel_path.parts[:-1] + (rel_path.stem,))

    func parse_function_docsring()

    源代码在GitHub上查看
    python
    def parse_function_docsring():
         pass

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/chat.html b/dev/api/plugins/builtin_tools/chat.html index 593dd476..1fd160f9 100644 --- a/dev/api/plugins/builtin_tools/chat.html +++ b/dev/api/plugins/builtin_tools/chat.html @@ -43,7 +43,7 @@ return '发送完成' except Exception as e: return '发送失败: ' + str(e)

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/file_io.html b/dev/api/plugins/builtin_tools/file_io.html index b5fcaf6b..b2e021d4 100644 --- a/dev/api/plugins/builtin_tools/file_io.html +++ b/dev/api/plugins/builtin_tools/file_io.html @@ -33,7 +33,7 @@ return '写入成功' except Exception as e: return '写入出错: ' + str(e)

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/index.html b/dev/api/plugins/builtin_tools/index.html index 9616cba2..d6eeab17 100644 --- a/dev/api/plugins/builtin_tools/index.html +++ b/dev/api/plugins/builtin_tools/index.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/liteyuki.html b/dev/api/plugins/builtin_tools/liteyuki.html index 28b13508..be3b0185 100644 --- a/dev/api/plugins/builtin_tools/liteyuki.html +++ b/dev/api/plugins/builtin_tools/liteyuki.html @@ -29,7 +29,7 @@ response = await client.get('https://api.liteyuki.icu/online') online = response.json().get('online') return f'注册节点数: {register}\n在线节点数: {online}'

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/manager.html b/dev/api/plugins/builtin_tools/manager.html index 9c783087..3c221c00 100644 --- a/dev/api/plugins/builtin_tools/manager.html +++ b/dev/api/plugins/builtin_tools/manager.html @@ -28,7 +28,7 @@ else: reply += f'名称: {p.name},描述: 暂无\n' return reply

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/network.html b/dev/api/plugins/builtin_tools/network.html index 9bc8d35e..c2895589 100644 --- a/dev/api/plugins/builtin_tools/network.html +++ b/dev/api/plugins/builtin_tools/network.html @@ -40,7 +40,7 @@ logger.error(f'marsho builtin: 获取网页内容失败: {e}') return '获取网页内容失败:' + str(e) return '未能获取到有效的网页内容'

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/utils.html b/dev/api/plugins/builtin_tools/utils.html index db4b80c7..fec1ce7e 100644 --- a/dev/api/plugins/builtin_tools/utils.html +++ b/dev/api/plugins/builtin_tools/utils.html @@ -22,7 +22,7 @@
    Skip to content

    模块 nonebot_plugin_marshoai.plugins.builtin_tools.utils


    async func make_html_summary(html_content: str, language: str = 'english', length: int = 3) -> str

    说明: 使用html内容生成摘要

    参数:

    • html_content (str): html内容
    • language (str, optional): 语言. Defaults to "english".
    • length (int, optional): 摘要长度. Defaults to 3.

    返回: str: 摘要

    源代码在GitHub上查看
    python
    async def make_html_summary(html_content: str, language: str='english', length: int=3) -> str:
         loop = asyncio.get_event_loop()
         return await loop.run_in_executor(executor, _make_summary, html_content, language, length)

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/marshoai_bangumi/index.html b/dev/api/plugins/marshoai_bangumi/index.html index 831bf9ed..e45a9040 100644 --- a/dev/api/plugins/marshoai_bangumi/index.html +++ b/dev/api/plugins/marshoai_bangumi/index.html @@ -47,7 +47,7 @@ except Exception as e: traceback.print_exc() return ''

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/marshoai_basic/index.html b/dev/api/plugins/marshoai_basic/index.html index 538d07ce..b16b997e 100644 --- a/dev/api/plugins/marshoai_basic/index.html +++ b/dev/api/plugins/marshoai_basic/index.html @@ -30,7 +30,7 @@ current_lunar_date = DateTime.now().to_lunar().date_hanzify()[5:] time_prompt = f'现在的时间是{current_time}{current_weekday_name},农历{current_lunar_date}。' return time_prompt

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/twisuki_megakits/index.html b/dev/api/plugins/twisuki_megakits/index.html index eeb9081a..94c364fd 100644 --- a/dev/api/plugins/twisuki_megakits/index.html +++ b/dev/api/plugins/twisuki_megakits/index.html @@ -28,7 +28,7 @@ return str(await mk_nya_code.nya_encrypt(msg))

    @on_function_call(description='将猫语翻译回人类语言').params(msg=String(description='被翻译语句'))

    async func nya_decrypt(msg: str) -> str

    说明: 将猫语翻译回人类语言

    源代码在GitHub上查看
    python
    @on_function_call(description='将猫语翻译回人类语言').params(msg=String(description='被翻译语句'))
     async def nya_decrypt(msg: str) -> str:
         return str(await mk_nya_code.nya_decrypt(msg))

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/twisuki_megakits/mk_morse_code.html b/dev/api/plugins/twisuki_megakits/mk_morse_code.html index dede0532..4891c6b8 100644 --- a/dev/api/plugins/twisuki_megakits/mk_morse_code.html +++ b/dev/api/plugins/twisuki_megakits/mk_morse_code.html @@ -38,7 +38,7 @@ else: result += '?' return result

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/twisuki_megakits/mk_nya_code.html b/dev/api/plugins/twisuki_megakits/mk_nya_code.html index 837355b0..f9e434e1 100644 --- a/dev/api/plugins/twisuki_megakits/mk_nya_code.html +++ b/dev/api/plugins/twisuki_megakits/mk_nya_code.html @@ -55,7 +55,7 @@ except Exception: return '翻译失败' return result

    var char

    var char

    var char

    var char

    var char

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/twisuki_petcat/index.html b/dev/api/plugins/twisuki_petcat/index.html index 3ab7d9c7..376d5281 100644 --- a/dev/api/plugins/twisuki_petcat/index.html +++ b/dev/api/plugins/twisuki_petcat/index.html @@ -36,7 +36,7 @@ return pc_info.print_type_list()

    @on_function_call(description='可选技能').params()

    async func help_cat_skill() -> str

    源代码在GitHub上查看
    python
    @on_function_call(description='可选技能').params()
     async def help_cat_skill() -> str:
         return pc_info.print_skill_list()

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/twisuki_petcat/pc_cat.html b/dev/api/plugins/twisuki_petcat/pc_cat.html index 4dbc10e7..57672131 100644 --- a/dev/api/plugins/twisuki_petcat/pc_cat.html +++ b/dev/api/plugins/twisuki_petcat/pc_cat.html @@ -126,7 +126,7 @@ data['energy'] = min(data['energy'] + 16, 0) token = dict_to_token(data) return f'''你抱猫休息了一阵子, 猫猫的活力值提升到了{value_output(data['energy'])}\n新token : "{token}"\n请妥善保存token, 这是猫猫的唯一标识符!'''

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/twisuki_petcat/pc_info.html b/dev/api/plugins/twisuki_petcat/pc_info.html index c6997000..c0470634 100644 --- a/dev/api/plugins/twisuki_petcat/pc_info.html +++ b/dev/api/plugins/twisuki_petcat/pc_info.html @@ -42,7 +42,7 @@ logger.info(data['skill']) return result[:-2]

    func help_cat_new() -> str

    源代码在GitHub上查看
    python
    def help_cat_new() -> str:
         return f'新建一只猫猫, 首先选择猫猫的种类, 获取初始化token;然后用这个token, 选择名字和一个技能进行初始化;初始化结束才表示猫猫正式创建成功.\ntoken为猫的唯一标识符, 每次交互都需要传入token\n种类可选 : {print_type_list()}\n技能可选 : {print_skill_list()}'

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins/twisuki_petcat/pc_shop.html b/dev/api/plugins/twisuki_petcat/pc_shop.html index f9507cb4..fb521ac7 100644 --- a/dev/api/plugins/twisuki_petcat/pc_shop.html +++ b/dev/api/plugins/twisuki_petcat/pc_shop.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/api/plugins/twisuki_petcat/pc_token.html b/dev/api/plugins/twisuki_petcat/pc_token.html index 50f1efc5..b404cba7 100644 --- a/dev/api/plugins/twisuki_petcat/pc_token.html +++ b/dev/api/plugins/twisuki_petcat/pc_token.html @@ -120,7 +120,7 @@ token = base64.b64encode(token_byte).decode() logger.success(f'编码完成, token为\n{token}') return token

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins_test/marshoai_basic/index.html b/dev/api/plugins_test/marshoai_basic/index.html index 00a3639e..8f8e556c 100644 --- a/dev/api/plugins_test/marshoai_basic/index.html +++ b/dev/api/plugins_test/marshoai_basic/index.html @@ -24,7 +24,7 @@ current_time = DateTime.now() time_prompt = '现在的时间是 {}{}{}。'.format(current_time.strftime('%Y.%m.%d %H:%M:%S'), weekdays[current_time.weekday()], current_time.chinesize.date_hanzify('农历{干支年}{生肖}{月份}{数序日}')) return time_prompt

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins_test/marshoai_memory/command.html b/dev/api/plugins_test/marshoai_memory/command.html index e845385a..fa1908c9 100644 --- a/dev/api/plugins_test/marshoai_memory/command.html +++ b/dev/api/plugins_test/marshoai_memory/command.html @@ -38,7 +38,7 @@ json.dump(memory_data, f, ensure_ascii=False, indent=4) await matcher.finish('记忆已重置~') await matcher.finish('没有找到该用户的记忆~')

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins_test/marshoai_memory/config.html b/dev/api/plugins_test/marshoai_memory/config.html index d9fe1943..c4e6c4e9 100644 --- a/dev/api/plugins_test/marshoai_memory/config.html +++ b/dev/api/plugins_test/marshoai_memory/config.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/api/plugins_test/marshoai_memory/index.html b/dev/api/plugins_test/marshoai_memory/index.html index 1abc3345..a4001d00 100644 --- a/dev/api/plugins_test/marshoai_memory/index.html +++ b/dev/api/plugins_test/marshoai_memory/index.html @@ -49,7 +49,7 @@ logger.error(f'整理关于{i}的记忆时出错:{res}') with open(memory_path, 'w', encoding='utf-8') as f: json.dump(memory_data, f, ensure_ascii=False, indent=4)

    var memory

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins_test/random_number_generator.html b/dev/api/plugins_test/random_number_generator.html index 94012d54..d0cd3f3b 100644 --- a/dev/api/plugins_test/random_number_generator.html +++ b/dev/api/plugins_test/random_number_generator.html @@ -25,7 +25,7 @@ return f"生成的随机数为: {', '.join(map(str, random_numbers))}"

    @on_function_call(description='重载测试')

    func test_reload()

    源代码在GitHub上查看
    python
    @on_function_call(description='重载测试')
     def test_reload():
         return 1

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins_test/snowykami_testplugin/index.html b/dev/api/plugins_test/snowykami_testplugin/index.html index 48bcef29..eee65f33 100644 --- a/dev/api/plugins_test/snowykami_testplugin/index.html +++ b/dev/api/plugins_test/snowykami_testplugin/index.html @@ -43,7 +43,7 @@ except Exception as e: return '运行出错: ' + str(e) return '运行成功: ' + str(r)

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/plugins_test/weather_demo.html b/dev/api/plugins_test/weather_demo.html index 6d0b60a8..a6c65345 100644 --- a/dev/api/plugins_test/weather_demo.html +++ b/dev/api/plugins_test/weather_demo.html @@ -22,7 +22,7 @@
    Skip to content

    模块 nonebot_plugin_marshoai.plugins_test.weather_demo


    @on_function_call(description='可以用于查询天气').params(location=String(description='地点'))

    async func weather(location: str) -> str

    源代码在GitHub上查看
    python
    @on_function_call(description='可以用于查询天气').params(location=String(description='地点'))
     async def weather(location: str) -> str:
         return f'{location}的天气是晴天, 温度是25°C'

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_bangumi/index.html b/dev/api/tools/marshoai_bangumi/index.html index bc5b9fc2..2eae64a8 100644 --- a/dev/api/tools/marshoai_bangumi/index.html +++ b/dev/api/tools/marshoai_bangumi/index.html @@ -40,7 +40,7 @@ except Exception as e: traceback.print_exc() return ''

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_basic/index.html b/dev/api/tools/marshoai_basic/index.html index b06541f4..f3df75b1 100644 --- a/dev/api/tools/marshoai_basic/index.html +++ b/dev/api/tools/marshoai_basic/index.html @@ -25,7 +25,7 @@ return str(ver)

    async func get_current_time()

    源代码在GitHub上查看
    python
    async def get_current_time():
         current_time = DateTime.now()
         return time_prompt.format(date_time=current_time.strftime('%Y年%m月%d日 %H:%M:%S'), weekday_name=weekdays[current_time.weekday()], lunar_date=current_time.to_lunar().date_hanzify('{干支年}{生肖}{月份}{日期}日'))

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_megakits/index.html b/dev/api/tools/marshoai_megakits/index.html index 3b278465..4c2c615d 100644 --- a/dev/api/tools/marshoai_megakits/index.html +++ b/dev/api/tools/marshoai_megakits/index.html @@ -28,7 +28,7 @@ return str(await mk_morse_code.morse_decrypt(msg))

    async func nya_encode(msg: str)

    源代码在GitHub上查看
    python
    async def nya_encode(msg: str):
         return str(await mk_nya_code.nya_encode(msg))

    async func nya_decode(msg: str)

    源代码在GitHub上查看
    python
    async def nya_decode(msg: str):
         return str(await mk_nya_code.nya_decode(msg))

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_megakits/mk_common.html b/dev/api/tools/marshoai_megakits/mk_common.html index 4cc5eede..4431515c 100644 --- a/dev/api/tools/marshoai_megakits/mk_common.html +++ b/dev/api/tools/marshoai_megakits/mk_common.html @@ -37,7 +37,7 @@ return str(a % b) case _: return '未知运算符'

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_megakits/mk_info.html b/dev/api/tools/marshoai_megakits/mk_info.html index 24fe74d4..cbd42c5f 100644 --- a/dev/api/tools/marshoai_megakits/mk_info.html +++ b/dev/api/tools/marshoai_megakits/mk_info.html @@ -22,7 +22,7 @@
    Skip to content

    模块 nonebot_plugin_marshoai.tools.marshoai_megakits.mk_info


    async func twisuki()

    源代码在GitHub上查看
    python
    async def twisuki():
         return 'Twiuski(苏阳)是megakits插件作者, Github : "https://github.com/Twisuki"'

    async func megakits()

    源代码在GitHub上查看
    python
    async def megakits():
         return 'MegaKits插件是一个功能混杂的MarshoAI插件, 由Twisuki(Github : "https://github.com/Twisuki")开发, 插件仓库 : "https://github.com/LiteyukiStudio/marsho-toolsets/tree/main/Twisuki/marshoai-megakits"'

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_megakits/mk_morse_code.html b/dev/api/tools/marshoai_megakits/mk_morse_code.html index 2ccbb027..68d4d8ea 100644 --- a/dev/api/tools/marshoai_megakits/mk_morse_code.html +++ b/dev/api/tools/marshoai_megakits/mk_morse_code.html @@ -37,7 +37,7 @@ else: result += '?' return result

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_megakits/mk_nya_code.html b/dev/api/tools/marshoai_megakits/mk_nya_code.html index 76fef5a8..70f898ee 100644 --- a/dev/api/tools/marshoai_megakits/mk_nya_code.html +++ b/dev/api/tools/marshoai_megakits/mk_nya_code.html @@ -51,7 +51,7 @@ except Exception: return '翻译失败' return result

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_memory/index.html b/dev/api/tools/marshoai_memory/index.html index b76c0b55..ed219c7a 100644 --- a/dev/api/tools/marshoai_memory/index.html +++ b/dev/api/tools/marshoai_memory/index.html @@ -38,7 +38,7 @@ memory_data = json.load(f) for i in memory_data: ...

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_meogirl/index.html b/dev/api/tools/marshoai_meogirl/index.html index b8c8384b..8912ea6a 100644 --- a/dev/api/tools/marshoai_meogirl/index.html +++ b/dev/api/tools/marshoai_meogirl/index.html @@ -23,7 +23,7 @@ return mg_info.meogirl()

    async func search(msg: str, num: int = 3)

    源代码在GitHub上查看
    python
    async def search(msg: str, num: int=3):
         return str(await mg_search.search(msg, num))

    async func introduce(msg: str)

    源代码在GitHub上查看
    python
    async def introduce(msg: str):
         return str(await mg_introduce.introduce(msg))

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_meogirl/mg_info.html b/dev/api/tools/marshoai_meogirl/mg_info.html index a4c6f1d3..1c380102 100644 --- a/dev/api/tools/marshoai_meogirl/mg_info.html +++ b/dev/api/tools/marshoai_meogirl/mg_info.html @@ -21,7 +21,7 @@ - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_meogirl/mg_introduce.html b/dev/api/tools/marshoai_meogirl/mg_introduce.html index 3db0356d..885a0558 100644 --- a/dev/api/tools/marshoai_meogirl/mg_introduce.html +++ b/dev/api/tools/marshoai_meogirl/mg_introduce.html @@ -61,7 +61,7 @@ else: logger.error(f'网络错误, 状态码 : {response.status_code}') return f'网络错误, 状态码 : {response.status_code}'

    var keyword

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_meogirl/mg_search.html b/dev/api/tools/marshoai_meogirl/mg_search.html index 585c07de..1feae1ac 100644 --- a/dev/api/tools/marshoai_meogirl/mg_search.html +++ b/dev/api/tools/marshoai_meogirl/mg_search.html @@ -58,7 +58,7 @@ else: logger.error(f'网络错误, 状态码 : {response.status_code}') return f'网络错误, 状态码 : {response.status_code}'

    var soup

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/tools_wip/marshoai_memory/index.html b/dev/api/tools_wip/marshoai_memory/index.html index d26eefba..5145700b 100644 --- a/dev/api/tools_wip/marshoai_memory/index.html +++ b/dev/api/tools_wip/marshoai_memory/index.html @@ -21,7 +21,7 @@ - + \ No newline at end of file diff --git a/dev/api/util.html b/dev/api/util.html index 426e9f13..21a2be96 100644 --- a/dev/api/util.html +++ b/dev/api/util.html @@ -171,7 +171,7 @@ result_msg.append(TextMsg(tag_found + '(未知内容解析失败)')) result_msg.append(TextMsg(await get_uuid_back2codeblock(msg[last_tag_index:], code_blank_uuid_map))) return result_msg

    var thinking

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/api/util_hunyuan.html b/dev/api/util_hunyuan.html index 0f78fe06..9ab205ab 100644 --- a/dev/api/util_hunyuan.html +++ b/dev/api/util_hunyuan.html @@ -31,7 +31,7 @@ req.from_json_string(json.dumps(params)) resp = client.TextToImageLite(req) return resp.to_json_string()

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/extension.html b/dev/extension.html index 7c1dd6ec..79653734 100644 --- a/dev/extension.html +++ b/dev/extension.html @@ -48,7 +48,7 @@ @on_function_call(description="获取机器人信息") async def get_bot_info(b: Bot) -> str: return f"机器人ID: {b.self_id}"

    兼容性

    插件可以编写NoneBot或者轻雪插件的内容,可作为NoneBot插件或者轻雪插件单独发布

    不过,所编写功能仅会在对应的实例上加载对应的功能,如果通过marshoai加载混合插件,那么插件中NoneBot的功能将会依附于marshoai插件, 若通过NoneBot加载包含marshoai功能的NoneBot插件,那么marshoai功能将会依附于NoneBot插件。

    我们建议:若插件中包含了NoneBot功能,仍然使用marshoai进行加载,这样更符合逻辑。若你想发布为NoneBot插件,请注意require("nonebot_plugin_marshoai"),这是老生常谈了。

    TIP

    本质上都是动态导入和注册声明加载,运行时把这些东西塞到一起

    插件热重载

    插件热重载是一个实验性功能,可以在不重启机器人的情况下更新插件

    WARNING

    框架无法完全消除之前插件带来的副作用,当开发测试中效果不符合预期时请重启机器人实例

    为了更好地让热重载功能正常工作,尽可能使用函数式的编程风格,以减少副作用的影响

    MARSHOAI_DEVMODE环境变量设置为true,然后在配置的插件目录MARSHOAI_PLUGIN_DIRS下开发插件,当插件发生变化时,机器人会自动变动的插件。

    AIGC 自举

    WARNING

    该功能为实验性功能,请注意甄别AI的行为,不要让AI执行危险的操作。

    function call为AI赋能,实现了文件io操作,AI可以调用function call来读取文档然后给自己编写代码,实现自举。

    其他

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index 162d2c8f..7d42c31c 100644 --- a/dev/index.html +++ b/dev/index.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/project.html b/dev/project.html index d646531e..78aad6fb 100644 --- a/dev/project.html +++ b/dev/project.html @@ -25,7 +25,7 @@ pip install pdm # 安装依赖管理 pdm install # 安装依赖 pre-commit install # 安装 pre-commit 钩子

    代码规范

    主仓库需要遵循以下代码规范

    可以在编辑器中安装相应的插件进行辅助

    其他

    感谢以下的贡献者们:

    Contributors

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/en/dev/api/azure.html b/en/dev/api/azure.html index 30fc71a9..db55fb9b 100644 --- a/en/dev/api/azure.html +++ b/en/dev/api/azure.html @@ -180,7 +180,7 @@ await UniMessage(str(e) + suggest_solution(str(e))).send() traceback.print_exc() return

    var text

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/azure_onebot.html b/en/dev/api/azure_onebot.html index 4360724e..5ec2749b 100644 --- a/en/dev/api/azure_onebot.html +++ b/en/dev/api/azure_onebot.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/config.html b/en/dev/api/config.html index 99e69085..5f49db94 100644 --- a/en/dev/api/config.html +++ b/en/dev/api/config.html @@ -38,7 +38,7 @@ logger.info(f'新增配置项: {key} = {value}') old_config[key] = value return old_config

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/constants.html b/en/dev/api/constants.html index a58252f8..df1e7235 100644 --- a/en/dev/api/constants.html +++ b/en/dev/api/constants.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/deal_latex.html b/en/dev/api/deal_latex.html index 1efac1ec..3d390893 100644 --- a/en/dev/api/deal_latex.html +++ b/en/dev/api/deal_latex.html @@ -114,7 +114,7 @@ results = await asyncio.gather(*(channel_test_wrapper(channel) for channel in channel_list)) best_channel = min(results, key=lambda x: x[0])[1] return best_channel()

    attr channel: ConvertChannel = NO_DEFAULT

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/dev.html b/en/dev/api/dev.html index 66f7a9f3..42486d81 100644 --- a/en/dev/api/dev.html +++ b/en/dev/api/dev.html @@ -64,7 +64,7 @@ else: logger.debug('未找到变动插件') return

    var dir_list

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/hooks.html b/en/dev/api/hooks.html index 85d1c94f..e91d471e 100644 --- a/en/dev/api/hooks.html +++ b/en/dev/api/hooks.html @@ -30,7 +30,7 @@ target_uid = 'group_' + target_id await save_context_to_json(f'back_up_context_{target_uid}', contexts_data, 'contexts/backup') logger.info(f'已保存会话 {target_id} 的上下文备份,将在下次对话时恢复~')

    var marshoai_plugin_dirs

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/hunyuan.html b/en/dev/api/hunyuan.html index 6ef3775c..9a1ae671 100644 --- a/en/dev/api/hunyuan.html +++ b/en/dev/api/hunyuan.html @@ -29,7 +29,7 @@ await UniMessage.image(url=url).send() except Exception as e: traceback.print_exc()

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/index.html b/en/dev/api/index.html index 2f4ebdc3..cfd9e409 100644 --- a/en/dev/api/index.html +++ b/en/dev/api/index.html @@ -20,7 +20,7 @@
    Skip to content

    Module nonebot_plugin_marshoai

    MIT License

    Copyright (c) 2025 Asankilp & LiteyukiStudio

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/instances.html b/en/dev/api/instances.html index 16727ad3..9ceaee1e 100644 --- a/en/dev/api/instances.html +++ b/en/dev/api/instances.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/marsho.html b/en/dev/api/marsho.html index 49b4a5e6..a0aac204 100644 --- a/en/dev/api/marsho.html +++ b/en/dev/api/marsho.html @@ -215,7 +215,7 @@ await UniMessage(str(e) + suggest_solution(str(e))).send() traceback.print_exc() return

    var text

    var request_msg

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/marsho_onebot.html b/en/dev/api/marsho_onebot.html index 61939867..010ed6b9 100644 --- a/en/dev/api/marsho_onebot.html +++ b/en/dev/api/marsho_onebot.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/metadata.html b/en/dev/api/metadata.html index a252505b..feefe304 100644 --- a/en/dev/api/metadata.html +++ b/en/dev/api/metadata.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/models.html b/en/dev/api/models.html index 7d14042e..c5dbf302 100644 --- a/en/dev/api/models.html +++ b/en/dev/api/models.html @@ -65,7 +65,7 @@ if not self.tools_list or not config.marshoai_enable_tools: return None return self.tools_list

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/observer.html b/en/dev/api/observer.html index 38155f65..0318d15f 100644 --- a/en/dev/api/observer.html +++ b/en/dev/api/observer.html @@ -55,7 +55,7 @@ observer.schedule(code_modified_handler, directory, recursive=recursive) return func return decorator

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugin/func_call/caller.html b/en/dev/api/plugin/func_call/caller.html index 775c7191..0f619bf0 100644 --- a/en/dev/api/plugin/func_call/caller.html +++ b/en/dev/api/plugin/func_call/caller.html @@ -128,7 +128,7 @@ caller = Caller(name=name, description=description, func_type=func_type, no_module_name=no_module_name) return caller

    func get_function_calls() -> dict[str, Caller]

    Description: 获取所有已注册的function call函数

    Return: dict[str, Caller]: 所有已注册的function call函数

    Source code or View on GitHub
    python
    def get_function_calls() -> dict[str, Caller]:
         return _caller_data

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugin/func_call/index.html b/en/dev/api/plugin/func_call/index.html index 44f743fa..fa448c9e 100644 --- a/en/dev/api/plugin/func_call/index.html +++ b/en/dev/api/plugin/func_call/index.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/plugin/func_call/models.html b/en/dev/api/plugin/func_call/models.html index 6a61adcb..2749167f 100644 --- a/en/dev/api/plugin/func_call/models.html +++ b/en/dev/api/plugin/func_call/models.html @@ -20,7 +20,7 @@
    Skip to content

    Module nonebot_plugin_marshoai.plugin.func_call.models

    class SessionContext(BaseModel)

    attr bot: Bot = NO_DEFAULT

    attr event: Event = NO_DEFAULT

    attr matcher: Matcher = NO_DEFAULT

    attr state: T_State = NO_DEFAULT

    attr caller: Any = None

    class SessionContextDepends(BaseModel)

    attr bot: str | None = None

    attr event: str | None = None

    attr matcher: str | None = None

    attr state: str | None = None

    attr caller: str | None = None

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugin/func_call/params.html b/en/dev/api/plugin/func_call/params.html index 5c4dc573..37546b43 100644 --- a/en/dev/api/plugin/func_call/params.html +++ b/en/dev/api/plugin/func_call/params.html @@ -23,7 +23,7 @@ return {'type': self.type_, 'description': self.description, **{k: v for k, v in self.properties.items() if v is not None}}

    attr type_: str = NO_DEFAULT

    attr description: str = NO_DEFAULT

    attr default: Any = None

    attr properties: dict[str, Any] = {}

    attr required: bool = False

    class String(Parameter)

    attr type_: str = ParamTypes.STRING

    attr properties: dict[str, Any] = Field(default_factory=dict)

    attr enum: list[str] | None = None

    class Integer(Parameter)

    attr type_: str = ParamTypes.INTEGER

    attr properties: dict[str, Any] = Field(default_factory=lambda: {'minimum': 0, 'maximum': 100})

    attr minimum: int | None = None

    attr maximum: int | None = None

    class Array(Parameter)

    attr type_: str = ParamTypes.ARRAY

    attr properties: dict[str, Any] = Field(default_factory=lambda: {'items': {'type': 'string'}})

    attr items: str = Field('string', description='数组元素类型')

    class FunctionCall(BaseModel)


    func hash self => int

    Source code or View on GitHub
    python
    def __hash__(self) -> int:
         return hash(self.name)

    func data(self) -> dict[str, Any]

    Description: 生成函数描述信息

    Return: dict[str, Any]: 函数描述信息 字典

    Source code or View on GitHub
    python
    def data(self) -> dict[str, Any]:
         return {'type': 'function', 'function': {'name': self.name, 'description': self.description, 'parameters': {'type': 'object', 'properties': {k: v.data() for k, v in self.arguments.items()}}, 'required': [k for k, v in self.arguments.items() if v.default is None], **self.kwargs}}

    attr name: str = NO_DEFAULT

    attr description: str = NO_DEFAULT

    attr arguments: dict[str, Parameter] = NO_DEFAULT

    attr function: FUNCTION_CALL_FUNC = NO_DEFAULT

    attr kwargs: dict[str, Any] = {}

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugin/func_call/utils.html b/en/dev/api/plugin/func_call/utils.html index c150a725..b0684b5b 100644 --- a/en/dev/api/plugin/func_call/utils.html +++ b/en/dev/api/plugin/func_call/utils.html @@ -39,7 +39,7 @@ return False func_ = getattr(call, '__call__', None) return inspect.iscoroutinefunction(func_)

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugin/index.html b/en/dev/api/plugin/index.html index 2c67d649..b5a7ea13 100644 --- a/en/dev/api/plugin/index.html +++ b/en/dev/api/plugin/index.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/plugin/load.html b/en/dev/api/plugin/load.html index f0af962f..37818fa5 100644 --- a/en/dev/api/plugin/load.html +++ b/en/dev/api/plugin/load.html @@ -69,7 +69,7 @@ logger.opt(colors=True).error(f'重新加载插件失败 "<r>{plugin.name}</r>"') traceback.print_exc() return None

    var module

    var module_name

    var module_name

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugin/models.html b/en/dev/api/plugin/models.html index 9c65f811..432a0972 100644 --- a/en/dev/api/plugin/models.html +++ b/en/dev/api/plugin/models.html @@ -22,7 +22,7 @@
    Skip to content

    Module nonebot_plugin_marshoai.plugin.models

    class PluginMetadata(BaseModel)

    attr name: str = NO_DEFAULT

    attr description: str = ''

    attr usage: str = ''

    attr author: str = ''

    attr homepage: str = ''

    attr extra: dict[str, Any] = {}

    class Plugin(BaseModel)


    func hash self => int

    Source code or View on GitHub
    python
    def __hash__(self) -> int:
         return hash(self.name)

    func self == other: Any => bool

    Source code or View on GitHub
    python
    def __eq__(self, other: Any) -> bool:
         return self.name == other.name

    attr name: str = NO_DEFAULT

    attr module: ModuleType = NO_DEFAULT

    attr module_name: str = NO_DEFAULT

    attr module_path: str | None = NO_DEFAULT

    attr metadata: PluginMetadata | None = None

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugin/register.html b/en/dev/api/plugin/register.html index 2025b01c..e365752d 100644 --- a/en/dev/api/plugin/register.html +++ b/en/dev/api/plugin/register.html @@ -29,7 +29,7 @@ name = func.__name__ description = func.__doc__ logger.info(f'注册函数: {name} {description}')

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugin/typing.html b/en/dev/api/plugin/typing.html index f4cff6ec..d91cdd19 100644 --- a/en/dev/api/plugin/typing.html +++ b/en/dev/api/plugin/typing.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/plugin/utils.html b/en/dev/api/plugin/utils.html index cd67442c..8a2714c1 100644 --- a/en/dev/api/plugin/utils.html +++ b/en/dev/api/plugin/utils.html @@ -26,7 +26,7 @@ else: return '.'.join(rel_path.parts[:-1] + (rel_path.stem,))

    func parse_function_docsring()

    Source code or View on GitHub
    python
    def parse_function_docsring():
         pass

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/builtin_tools/chat.html b/en/dev/api/plugins/builtin_tools/chat.html index 383f1c64..6f6fb5b8 100644 --- a/en/dev/api/plugins/builtin_tools/chat.html +++ b/en/dev/api/plugins/builtin_tools/chat.html @@ -43,7 +43,7 @@ return '发送完成' except Exception as e: return '发送失败: ' + str(e)

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/builtin_tools/file_io.html b/en/dev/api/plugins/builtin_tools/file_io.html index 2ebd09e7..3aab9db6 100644 --- a/en/dev/api/plugins/builtin_tools/file_io.html +++ b/en/dev/api/plugins/builtin_tools/file_io.html @@ -33,7 +33,7 @@ return '写入成功' except Exception as e: return '写入出错: ' + str(e)

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/builtin_tools/index.html b/en/dev/api/plugins/builtin_tools/index.html index af18e1d8..502c346a 100644 --- a/en/dev/api/plugins/builtin_tools/index.html +++ b/en/dev/api/plugins/builtin_tools/index.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/plugins/builtin_tools/liteyuki.html b/en/dev/api/plugins/builtin_tools/liteyuki.html index c105c857..89550fc8 100644 --- a/en/dev/api/plugins/builtin_tools/liteyuki.html +++ b/en/dev/api/plugins/builtin_tools/liteyuki.html @@ -29,7 +29,7 @@ response = await client.get('https://api.liteyuki.icu/online') online = response.json().get('online') return f'注册节点数: {register}\n在线节点数: {online}'

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/builtin_tools/manager.html b/en/dev/api/plugins/builtin_tools/manager.html index 92b18367..1205bb50 100644 --- a/en/dev/api/plugins/builtin_tools/manager.html +++ b/en/dev/api/plugins/builtin_tools/manager.html @@ -28,7 +28,7 @@ else: reply += f'名称: {p.name},描述: 暂无\n' return reply

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/builtin_tools/network.html b/en/dev/api/plugins/builtin_tools/network.html index 1af95e78..e2669b02 100644 --- a/en/dev/api/plugins/builtin_tools/network.html +++ b/en/dev/api/plugins/builtin_tools/network.html @@ -40,7 +40,7 @@ logger.error(f'marsho builtin: 获取网页内容失败: {e}') return '获取网页内容失败:' + str(e) return '未能获取到有效的网页内容'

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/builtin_tools/utils.html b/en/dev/api/plugins/builtin_tools/utils.html index 87d9404b..68468d1d 100644 --- a/en/dev/api/plugins/builtin_tools/utils.html +++ b/en/dev/api/plugins/builtin_tools/utils.html @@ -22,7 +22,7 @@
    Skip to content

    Module nonebot_plugin_marshoai.plugins.builtin_tools.utils


    async func make_html_summary(html_content: str, language: str = 'english', length: int = 3) -> str

    Description: 使用html内容生成摘要

    Arguments:

    • html_content (str): html内容
    • language (str, optional): 语言. Defaults to "english".
    • length (int, optional): 摘要长度. Defaults to 3.

    Return: str: 摘要

    Source code or View on GitHub
    python
    async def make_html_summary(html_content: str, language: str='english', length: int=3) -> str:
         loop = asyncio.get_event_loop()
         return await loop.run_in_executor(executor, _make_summary, html_content, language, length)

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/marshoai_bangumi/index.html b/en/dev/api/plugins/marshoai_bangumi/index.html index d00722b0..b804efad 100644 --- a/en/dev/api/plugins/marshoai_bangumi/index.html +++ b/en/dev/api/plugins/marshoai_bangumi/index.html @@ -47,7 +47,7 @@ except Exception as e: traceback.print_exc() return ''

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/marshoai_basic/index.html b/en/dev/api/plugins/marshoai_basic/index.html index c56940b6..f0914a98 100644 --- a/en/dev/api/plugins/marshoai_basic/index.html +++ b/en/dev/api/plugins/marshoai_basic/index.html @@ -30,7 +30,7 @@ current_lunar_date = DateTime.now().to_lunar().date_hanzify()[5:] time_prompt = f'现在的时间是{current_time}{current_weekday_name},农历{current_lunar_date}。' return time_prompt

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/twisuki_megakits/index.html b/en/dev/api/plugins/twisuki_megakits/index.html index b6e34a87..8b09df33 100644 --- a/en/dev/api/plugins/twisuki_megakits/index.html +++ b/en/dev/api/plugins/twisuki_megakits/index.html @@ -28,7 +28,7 @@ return str(await mk_nya_code.nya_encrypt(msg))

    @on_function_call(description='将猫语翻译回人类语言').params(msg=String(description='被翻译语句'))

    async func nya_decrypt(msg: str) -> str

    Description: 将猫语翻译回人类语言

    Source code or View on GitHub
    python
    @on_function_call(description='将猫语翻译回人类语言').params(msg=String(description='被翻译语句'))
     async def nya_decrypt(msg: str) -> str:
         return str(await mk_nya_code.nya_decrypt(msg))

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/twisuki_megakits/mk_morse_code.html b/en/dev/api/plugins/twisuki_megakits/mk_morse_code.html index 5ecdde29..8ff28c67 100644 --- a/en/dev/api/plugins/twisuki_megakits/mk_morse_code.html +++ b/en/dev/api/plugins/twisuki_megakits/mk_morse_code.html @@ -38,7 +38,7 @@ else: result += '?' return result

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/twisuki_megakits/mk_nya_code.html b/en/dev/api/plugins/twisuki_megakits/mk_nya_code.html index f1a44b6a..2b9bf6a4 100644 --- a/en/dev/api/plugins/twisuki_megakits/mk_nya_code.html +++ b/en/dev/api/plugins/twisuki_megakits/mk_nya_code.html @@ -55,7 +55,7 @@ except Exception: return '翻译失败' return result

    var char

    var char

    var char

    var char

    var char

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/twisuki_petcat/index.html b/en/dev/api/plugins/twisuki_petcat/index.html index 9d74048c..c5a8ef03 100644 --- a/en/dev/api/plugins/twisuki_petcat/index.html +++ b/en/dev/api/plugins/twisuki_petcat/index.html @@ -36,7 +36,7 @@ return pc_info.print_type_list()

    @on_function_call(description='可选技能').params()

    async func help_cat_skill() -> str

    Source code or View on GitHub
    python
    @on_function_call(description='可选技能').params()
     async def help_cat_skill() -> str:
         return pc_info.print_skill_list()

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/twisuki_petcat/pc_cat.html b/en/dev/api/plugins/twisuki_petcat/pc_cat.html index d351a2b0..45280c55 100644 --- a/en/dev/api/plugins/twisuki_petcat/pc_cat.html +++ b/en/dev/api/plugins/twisuki_petcat/pc_cat.html @@ -126,7 +126,7 @@ data['energy'] = min(data['energy'] + 16, 0) token = dict_to_token(data) return f'''你抱猫休息了一阵子, 猫猫的活力值提升到了{value_output(data['energy'])}\n新token : "{token}"\n请妥善保存token, 这是猫猫的唯一标识符!'''

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/twisuki_petcat/pc_info.html b/en/dev/api/plugins/twisuki_petcat/pc_info.html index 352bf950..06664559 100644 --- a/en/dev/api/plugins/twisuki_petcat/pc_info.html +++ b/en/dev/api/plugins/twisuki_petcat/pc_info.html @@ -42,7 +42,7 @@ logger.info(data['skill']) return result[:-2]

    func help_cat_new() -> str

    Source code or View on GitHub
    python
    def help_cat_new() -> str:
         return f'新建一只猫猫, 首先选择猫猫的种类, 获取初始化token;然后用这个token, 选择名字和一个技能进行初始化;初始化结束才表示猫猫正式创建成功.\ntoken为猫的唯一标识符, 每次交互都需要传入token\n种类可选 : {print_type_list()}\n技能可选 : {print_skill_list()}'

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins/twisuki_petcat/pc_shop.html b/en/dev/api/plugins/twisuki_petcat/pc_shop.html index 7a14335a..291d70a2 100644 --- a/en/dev/api/plugins/twisuki_petcat/pc_shop.html +++ b/en/dev/api/plugins/twisuki_petcat/pc_shop.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/plugins/twisuki_petcat/pc_token.html b/en/dev/api/plugins/twisuki_petcat/pc_token.html index 44aa1d2f..fd367df5 100644 --- a/en/dev/api/plugins/twisuki_petcat/pc_token.html +++ b/en/dev/api/plugins/twisuki_petcat/pc_token.html @@ -120,7 +120,7 @@ token = base64.b64encode(token_byte).decode() logger.success(f'编码完成, token为\n{token}') return token

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins_test/marshoai_basic/index.html b/en/dev/api/plugins_test/marshoai_basic/index.html index 899cb4b6..04d2e987 100644 --- a/en/dev/api/plugins_test/marshoai_basic/index.html +++ b/en/dev/api/plugins_test/marshoai_basic/index.html @@ -24,7 +24,7 @@ current_time = DateTime.now() time_prompt = '现在的时间是 {}{}{}。'.format(current_time.strftime('%Y.%m.%d %H:%M:%S'), weekdays[current_time.weekday()], current_time.chinesize.date_hanzify('农历{干支年}{生肖}{月份}{数序日}')) return time_prompt

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins_test/marshoai_memory/command.html b/en/dev/api/plugins_test/marshoai_memory/command.html index c658f175..c8151335 100644 --- a/en/dev/api/plugins_test/marshoai_memory/command.html +++ b/en/dev/api/plugins_test/marshoai_memory/command.html @@ -38,7 +38,7 @@ json.dump(memory_data, f, ensure_ascii=False, indent=4) await matcher.finish('记忆已重置~') await matcher.finish('没有找到该用户的记忆~')

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins_test/marshoai_memory/config.html b/en/dev/api/plugins_test/marshoai_memory/config.html index 76139362..52ac25e0 100644 --- a/en/dev/api/plugins_test/marshoai_memory/config.html +++ b/en/dev/api/plugins_test/marshoai_memory/config.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/plugins_test/marshoai_memory/index.html b/en/dev/api/plugins_test/marshoai_memory/index.html index c8f88bb8..056cf17b 100644 --- a/en/dev/api/plugins_test/marshoai_memory/index.html +++ b/en/dev/api/plugins_test/marshoai_memory/index.html @@ -49,7 +49,7 @@ logger.error(f'整理关于{i}的记忆时出错:{res}') with open(memory_path, 'w', encoding='utf-8') as f: json.dump(memory_data, f, ensure_ascii=False, indent=4)

    var memory

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins_test/random_number_generator.html b/en/dev/api/plugins_test/random_number_generator.html index dafe706c..418b921a 100644 --- a/en/dev/api/plugins_test/random_number_generator.html +++ b/en/dev/api/plugins_test/random_number_generator.html @@ -25,7 +25,7 @@ return f"生成的随机数为: {', '.join(map(str, random_numbers))}"

    @on_function_call(description='重载测试')

    func test_reload()

    Source code or View on GitHub
    python
    @on_function_call(description='重载测试')
     def test_reload():
         return 1

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins_test/snowykami_testplugin/index.html b/en/dev/api/plugins_test/snowykami_testplugin/index.html index bc6da3bb..e25ae1a8 100644 --- a/en/dev/api/plugins_test/snowykami_testplugin/index.html +++ b/en/dev/api/plugins_test/snowykami_testplugin/index.html @@ -43,7 +43,7 @@ except Exception as e: return '运行出错: ' + str(e) return '运行成功: ' + str(r)

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/plugins_test/weather_demo.html b/en/dev/api/plugins_test/weather_demo.html index 910218b3..838c593d 100644 --- a/en/dev/api/plugins_test/weather_demo.html +++ b/en/dev/api/plugins_test/weather_demo.html @@ -22,7 +22,7 @@
    Skip to content

    Module nonebot_plugin_marshoai.plugins_test.weather_demo


    @on_function_call(description='可以用于查询天气').params(location=String(description='地点'))

    async func weather(location: str) -> str

    Source code or View on GitHub
    python
    @on_function_call(description='可以用于查询天气').params(location=String(description='地点'))
     async def weather(location: str) -> str:
         return f'{location}的天气是晴天, 温度是25°C'

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_bangumi/index.html b/en/dev/api/tools/marshoai_bangumi/index.html index b6a122ef..c974ce69 100644 --- a/en/dev/api/tools/marshoai_bangumi/index.html +++ b/en/dev/api/tools/marshoai_bangumi/index.html @@ -40,7 +40,7 @@ except Exception as e: traceback.print_exc() return ''

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_basic/index.html b/en/dev/api/tools/marshoai_basic/index.html index ef1e9478..786750ac 100644 --- a/en/dev/api/tools/marshoai_basic/index.html +++ b/en/dev/api/tools/marshoai_basic/index.html @@ -25,7 +25,7 @@ return str(ver)

    async func get_current_time()

    Source code or View on GitHub
    python
    async def get_current_time():
         current_time = DateTime.now()
         return time_prompt.format(date_time=current_time.strftime('%Y年%m月%d日 %H:%M:%S'), weekday_name=weekdays[current_time.weekday()], lunar_date=current_time.to_lunar().date_hanzify('{干支年}{生肖}{月份}{日期}日'))

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_megakits/index.html b/en/dev/api/tools/marshoai_megakits/index.html index 3b62db2c..b5837a38 100644 --- a/en/dev/api/tools/marshoai_megakits/index.html +++ b/en/dev/api/tools/marshoai_megakits/index.html @@ -28,7 +28,7 @@ return str(await mk_morse_code.morse_decrypt(msg))

    async func nya_encode(msg: str)

    Source code or View on GitHub
    python
    async def nya_encode(msg: str):
         return str(await mk_nya_code.nya_encode(msg))

    async func nya_decode(msg: str)

    Source code or View on GitHub
    python
    async def nya_decode(msg: str):
         return str(await mk_nya_code.nya_decode(msg))

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_megakits/mk_common.html b/en/dev/api/tools/marshoai_megakits/mk_common.html index 4edb2d8e..b8bb200a 100644 --- a/en/dev/api/tools/marshoai_megakits/mk_common.html +++ b/en/dev/api/tools/marshoai_megakits/mk_common.html @@ -37,7 +37,7 @@ return str(a % b) case _: return '未知运算符'

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_megakits/mk_info.html b/en/dev/api/tools/marshoai_megakits/mk_info.html index 21a5bc0d..6b32c433 100644 --- a/en/dev/api/tools/marshoai_megakits/mk_info.html +++ b/en/dev/api/tools/marshoai_megakits/mk_info.html @@ -22,7 +22,7 @@
    Skip to content

    Module nonebot_plugin_marshoai.tools.marshoai_megakits.mk_info


    async func twisuki()

    Source code or View on GitHub
    python
    async def twisuki():
         return 'Twiuski(苏阳)是megakits插件作者, Github : "https://github.com/Twisuki"'

    async func megakits()

    Source code or View on GitHub
    python
    async def megakits():
         return 'MegaKits插件是一个功能混杂的MarshoAI插件, 由Twisuki(Github : "https://github.com/Twisuki")开发, 插件仓库 : "https://github.com/LiteyukiStudio/marsho-toolsets/tree/main/Twisuki/marshoai-megakits"'

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_megakits/mk_morse_code.html b/en/dev/api/tools/marshoai_megakits/mk_morse_code.html index 89d186fd..8d86f011 100644 --- a/en/dev/api/tools/marshoai_megakits/mk_morse_code.html +++ b/en/dev/api/tools/marshoai_megakits/mk_morse_code.html @@ -37,7 +37,7 @@ else: result += '?' return result

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_megakits/mk_nya_code.html b/en/dev/api/tools/marshoai_megakits/mk_nya_code.html index 844af27b..c6b3d42e 100644 --- a/en/dev/api/tools/marshoai_megakits/mk_nya_code.html +++ b/en/dev/api/tools/marshoai_megakits/mk_nya_code.html @@ -51,7 +51,7 @@ except Exception: return '翻译失败' return result

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_memory/index.html b/en/dev/api/tools/marshoai_memory/index.html index ecf329eb..b27a172a 100644 --- a/en/dev/api/tools/marshoai_memory/index.html +++ b/en/dev/api/tools/marshoai_memory/index.html @@ -38,7 +38,7 @@ memory_data = json.load(f) for i in memory_data: ...

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_meogirl/index.html b/en/dev/api/tools/marshoai_meogirl/index.html index 1afea936..30289c8e 100644 --- a/en/dev/api/tools/marshoai_meogirl/index.html +++ b/en/dev/api/tools/marshoai_meogirl/index.html @@ -23,7 +23,7 @@ return mg_info.meogirl()

    async func search(msg: str, num: int = 3)

    Source code or View on GitHub
    python
    async def search(msg: str, num: int=3):
         return str(await mg_search.search(msg, num))

    async func introduce(msg: str)

    Source code or View on GitHub
    python
    async def introduce(msg: str):
         return str(await mg_introduce.introduce(msg))

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_meogirl/mg_info.html b/en/dev/api/tools/marshoai_meogirl/mg_info.html index b2658849..b163d217 100644 --- a/en/dev/api/tools/marshoai_meogirl/mg_info.html +++ b/en/dev/api/tools/marshoai_meogirl/mg_info.html @@ -21,7 +21,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_meogirl/mg_introduce.html b/en/dev/api/tools/marshoai_meogirl/mg_introduce.html index 1bb82c20..c39f66e4 100644 --- a/en/dev/api/tools/marshoai_meogirl/mg_introduce.html +++ b/en/dev/api/tools/marshoai_meogirl/mg_introduce.html @@ -61,7 +61,7 @@ else: logger.error(f'网络错误, 状态码 : {response.status_code}') return f'网络错误, 状态码 : {response.status_code}'

    var keyword

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_meogirl/mg_search.html b/en/dev/api/tools/marshoai_meogirl/mg_search.html index 09d19ece..3b7f9d41 100644 --- a/en/dev/api/tools/marshoai_meogirl/mg_search.html +++ b/en/dev/api/tools/marshoai_meogirl/mg_search.html @@ -58,7 +58,7 @@ else: logger.error(f'网络错误, 状态码 : {response.status_code}') return f'网络错误, 状态码 : {response.status_code}'

    var soup

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/tools_wip/marshoai_memory/index.html b/en/dev/api/tools_wip/marshoai_memory/index.html index 46c423d0..84b36f2f 100644 --- a/en/dev/api/tools_wip/marshoai_memory/index.html +++ b/en/dev/api/tools_wip/marshoai_memory/index.html @@ -21,7 +21,7 @@ - + \ No newline at end of file diff --git a/en/dev/api/util.html b/en/dev/api/util.html index cdf0c943..691ea801 100644 --- a/en/dev/api/util.html +++ b/en/dev/api/util.html @@ -171,7 +171,7 @@ result_msg.append(TextMsg(tag_found + '(未知内容解析失败)')) result_msg.append(TextMsg(await get_uuid_back2codeblock(msg[last_tag_index:], code_blank_uuid_map))) return result_msg

    var thinking

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/api/util_hunyuan.html b/en/dev/api/util_hunyuan.html index 46b90bdb..58d369c3 100644 --- a/en/dev/api/util_hunyuan.html +++ b/en/dev/api/util_hunyuan.html @@ -31,7 +31,7 @@ req.from_json_string(json.dumps(params)) resp = client.TextToImageLite(req) return resp.to_json_string()

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/dev/index.html b/en/dev/index.html index d317c8f7..4a2f1526 100644 --- a/en/dev/index.html +++ b/en/dev/index.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/en/index.html b/en/index.html index 2dd9e625..56559ea3 100644 --- a/en/index.html +++ b/en/index.html @@ -20,7 +20,7 @@
    Skip to content

    MarshoAIA kawaii cat

    Kawaii, intelligent and extensible AI service plugin

    Marsho LogoMarsho Logo

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/start/index.html b/en/start/index.html index 9d0af691..c4decf5e 100644 --- a/en/start/index.html +++ b/en/start/index.html @@ -20,7 +20,7 @@
    Skip to content

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/en/start/install.html b/en/start/install.html index a34542c3..2dfaf04c 100644 --- a/en/start/install.html +++ b/en/start/install.html @@ -38,7 +38,7 @@ ... ] }

    ⚙️ Configurable options

    Add options in the .env file from the diagram below in nonebot2 project.

    plugin behaviour

    OptionTypeDefaultDescription
    MARSHOAI_USE_YAML_CONFIGboolfalseUse YAML config format
    MARSHOAI_DEVMODEbooltrueTurn on Development Mode or not

    Marsho usage

    OptionTypeDefaultDescription
    MARSHOAI_DEFAULT_NAMEstrmarshoCommand to call Marsho
    MARSHOAI_ALIASESset[str]list["小棉"]Other name(Alias) to call Marsho
    MARSHOAI_ATboolfalseCall by @ or not
    MARSHOAI_MAIN_COLOURstrFEABA9Theme color, used by some tools and features

    AI call

    OptionTypeDefaultDescription
    MARSHOAI_TOKENstrThe token needed to call AI API
    MARSHOAI_DEFAULT_MODELstrgpt-4o-miniThe default model of Marsho
    MARSHOAI_PROMPTstrCatgirl Marsho's character promptMarsho's basic system prompt ※Some models(o1 and so on) don't support it
    MARSHOAI_ADDITIONAL_PROMPTstrMarsho's external system prompt
    MARSHOAI_ENFORCE_NICKNAMEbooltrueEnforce user to set nickname or not
    MARSHOAI_POKE_SUFFIXstr揉了揉你的猫耳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 *[昵称]揉了揉你的猫耳。
    MARSHOAI_AZURE_ENDPOINTstrhttps://models.inference.ai.azure.comOpenAI standard API
    MARSHOAI_TEMPERATUREfloatnulltemperature parameter
    MARSHOAI_TOP_PfloatnullNucleus Sampling parameter
    MARSHOAI_MAX_TOKENSintnullMax token number
    MARSHOAI_ADDITIONAL_IMAGE_MODELSlist[]External image-support model list, such as hunyuan-vision
    MARSHOAI_NICKNAME_LIMITint16Limit for nickname length
    MARSHOAI_TIMEOUTfloat50AI request timeout (seconds)

    Feature Switches

    OptionTypeDefaultDescription
    MARSHOAI_ENABLE_SUPPORT_IMAGE_TIPbooltrueWhen on, if user send request with photo and model don't support that, remind the user
    MARSHOAI_ENABLE_NICKNAME_TIPbooltrueWhen on, if user haven't set username, remind user to set
    MARSHOAI_ENABLE_PRAISESbooltrueTurn on Praise list or not
    MARSHOAI_ENABLE_TIME_PROMPTbooltrueTurn on real-time date and time (accurate to seconds) and lunar date system prompt
    MARSHOAI_ENABLE_TOOLSboolfalseTurn on Marsho Tools or not
    MARSHOAI_ENABLE_PLUGINSbooltrueTurn on Marsho Plugins or not
    MARSHOAI_PLUGIN_DIRSlist[str][]List of plugins directory
    MARSHOAI_LOAD_BUILTIN_TOOLSbooltrueLoading the built-in toolkit or not
    MARSHOAI_TOOLSET_DIRlist[]List of external toolset directory
    MARSHOAI_DISABLED_TOOLKITSlist[]List of disabled toolkits' name
    MARSHOAI_ENABLE_RICHTEXT_PARSEbooltrueTurn on auto parse rich text feature(including image, LaTeX equation)
    MARSHOAI_SINGLE_LATEX_PARSEboolfalseRender single-line equation or not
    MARSHOAI_FIX_TOOLCALLSbooltrueFix tool calls or not
    MARSHOAI_SEND_THINKINGbooltrueSend thinking chain or not

    The document is being improved. Suggestions are welcome.

    - + \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index ad8836a3..0243b306 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"dev_api_azure.md":"By3DQZ1H","dev_api_azure_onebot.md":"BSzQi5NB","dev_api_config.md":"DSFD8ude","dev_api_constants.md":"CeyS-dgb","dev_api_deal_latex.md":"CliIHVQx","dev_api_dev.md":"CR8NfY8m","dev_api_hooks.md":"DpJrlEUX","dev_api_hunyuan.md":"DTtTdru3","dev_api_index.md":"DCRutF9O","dev_api_instances.md":"VkCkhorR","dev_api_marsho.md":"dF_hdEOQ","dev_api_marsho_onebot.md":"BaELa_5s","dev_api_metadata.md":"BvJb0wDC","dev_api_models.md":"CzLGyN0e","dev_api_observer.md":"CKxQ8rNr","dev_api_plugin_func_call_caller.md":"CzrTsykV","dev_api_plugin_func_call_index.md":"DSbV-DHP","dev_api_plugin_func_call_models.md":"CYOWq9i6","dev_api_plugin_func_call_params.md":"DIr0Wfuh","dev_api_plugin_func_call_utils.md":"CBpuIEsL","dev_api_plugin_index.md":"BpLPZBto","dev_api_plugin_load.md":"Z1_AJpA-","dev_api_plugin_models.md":"XO9ZgJTV","dev_api_plugin_register.md":"wxtxwL1q","dev_api_plugin_typing.md":"B_OdqvYr","dev_api_plugin_utils.md":"CKZ8uSFc","dev_api_plugins_builtin_tools_chat.md":"CX5fWmLQ","dev_api_plugins_builtin_tools_file_io.md":"B4WB3kMa","dev_api_plugins_builtin_tools_index.md":"CdVyaR56","dev_api_plugins_builtin_tools_liteyuki.md":"C2jQUuMC","dev_api_plugins_builtin_tools_manager.md":"CSx6-DqR","dev_api_plugins_builtin_tools_network.md":"qwTduvJA","dev_api_plugins_builtin_tools_utils.md":"BQ_zIszy","dev_api_plugins_marshoai_bangumi_index.md":"DI0wDzaI","dev_api_plugins_marshoai_basic_index.md":"CdMZUtoa","dev_api_plugins_test_marshoai_basic_index.md":"xGCd7eZm","dev_api_plugins_test_marshoai_memory_command.md":"CeJIbyf1","dev_api_plugins_test_marshoai_memory_config.md":"CtBtnl-b","dev_api_plugins_test_marshoai_memory_index.md":"wgRBaFEj","dev_api_plugins_test_random_number_generator.md":"CP2ZOHnt","dev_api_plugins_test_snowykami_testplugin_index.md":"DGUrAa-4","dev_api_plugins_test_weather_demo.md":"BhjRtDMw","dev_api_plugins_twisuki_megakits_index.md":"Dhj0Q_rd","dev_api_plugins_twisuki_megakits_mk_morse_code.md":"BPtKSrvY","dev_api_plugins_twisuki_megakits_mk_nya_code.md":"BDLuQWQj","dev_api_plugins_twisuki_petcat_index.md":"Db-1fmpK","dev_api_plugins_twisuki_petcat_pc_cat.md":"F2sC91-N","dev_api_plugins_twisuki_petcat_pc_info.md":"CvN9sngp","dev_api_plugins_twisuki_petcat_pc_shop.md":"DD4ahNPm","dev_api_plugins_twisuki_petcat_pc_token.md":"DA_UlEtw","dev_api_tools_marshoai_bangumi_index.md":"DBTSrMfh","dev_api_tools_marshoai_basic_index.md":"DzBLEWLC","dev_api_tools_marshoai_megakits_index.md":"REZMb3dg","dev_api_tools_marshoai_megakits_mk_common.md":"7APNTo8M","dev_api_tools_marshoai_megakits_mk_info.md":"ChkkoB5W","dev_api_tools_marshoai_megakits_mk_morse_code.md":"0M_XvS3m","dev_api_tools_marshoai_megakits_mk_nya_code.md":"c9sb8PmU","dev_api_tools_marshoai_memory_index.md":"CIRx5tJY","dev_api_tools_marshoai_meogirl_index.md":"XEkcu-t2","dev_api_tools_marshoai_meogirl_mg_info.md":"DPN0C8WV","dev_api_tools_marshoai_meogirl_mg_introduce.md":"BlzX94DI","dev_api_tools_marshoai_meogirl_mg_search.md":"BBTMELq_","dev_api_tools_wip_marshoai_memory_index.md":"Dm4TJCvU","dev_api_util.md":"Bph2gkvc","dev_api_util_hunyuan.md":"Dw50YpRa","dev_extension.md":"sCH8l0Kd","dev_index.md":"DmkkcOvS","dev_project.md":"si_Q_Qol","en_dev_api_azure.md":"Cto4HxOQ","en_dev_api_azure_onebot.md":"Nh5j0O6E","en_dev_api_config.md":"DFsolamx","en_dev_api_constants.md":"0iXpq-Ec","en_dev_api_deal_latex.md":"CoDpC8c1","en_dev_api_dev.md":"ZX87ppE0","en_dev_api_hooks.md":"BCTjt9JT","en_dev_api_hunyuan.md":"CAln-sCp","en_dev_api_index.md":"PTQTSFQN","en_dev_api_instances.md":"qxOeS8ME","en_dev_api_marsho.md":"D_PLwYjH","en_dev_api_marsho_onebot.md":"Bp39oSfi","en_dev_api_metadata.md":"BMq5AAe8","en_dev_api_models.md":"BPby54j6","en_dev_api_observer.md":"oTjjwmjn","en_dev_api_plugin_func_call_caller.md":"Bye_Nxpk","en_dev_api_plugin_func_call_index.md":"DWsorYJh","en_dev_api_plugin_func_call_models.md":"B-qnd7cH","en_dev_api_plugin_func_call_params.md":"u__hMe93","en_dev_api_plugin_func_call_utils.md":"iU5-nBge","en_dev_api_plugin_index.md":"BZIGSQUL","en_dev_api_plugin_load.md":"XwjzFCnp","en_dev_api_plugin_models.md":"KoVIfTB6","en_dev_api_plugin_register.md":"Duq9hOxH","en_dev_api_plugin_typing.md":"C2zfOXEp","en_dev_api_plugin_utils.md":"e5Btmrql","en_dev_api_plugins_builtin_tools_chat.md":"C23GjQBb","en_dev_api_plugins_builtin_tools_file_io.md":"C08lWCZX","en_dev_api_plugins_builtin_tools_index.md":"DbJ5EqSA","en_dev_api_plugins_builtin_tools_liteyuki.md":"x_VmenLc","en_dev_api_plugins_builtin_tools_manager.md":"u-0hfdOm","en_dev_api_plugins_builtin_tools_network.md":"CnxMIDLE","en_dev_api_plugins_builtin_tools_utils.md":"wCwWvzS9","en_dev_api_plugins_marshoai_bangumi_index.md":"DBU2Zi62","en_dev_api_plugins_marshoai_basic_index.md":"DyXm3jCh","en_dev_api_plugins_test_marshoai_basic_index.md":"DuyU21n7","en_dev_api_plugins_test_marshoai_memory_command.md":"u25QWY_i","en_dev_api_plugins_test_marshoai_memory_config.md":"fO2hq1Zg","en_dev_api_plugins_test_marshoai_memory_index.md":"C45XsXpP","en_dev_api_plugins_test_random_number_generator.md":"BbS1YDsu","en_dev_api_plugins_test_snowykami_testplugin_index.md":"QqX2hUew","en_dev_api_plugins_test_weather_demo.md":"CkQsPcOc","en_dev_api_plugins_twisuki_megakits_index.md":"DI9uZZaT","en_dev_api_plugins_twisuki_megakits_mk_morse_code.md":"CR7E4O63","en_dev_api_plugins_twisuki_megakits_mk_nya_code.md":"nvZAi5el","en_dev_api_plugins_twisuki_petcat_index.md":"Df3A8uE4","en_dev_api_plugins_twisuki_petcat_pc_cat.md":"CwByAWa2","en_dev_api_plugins_twisuki_petcat_pc_info.md":"C3tuga99","en_dev_api_plugins_twisuki_petcat_pc_shop.md":"CUZ6lawY","en_dev_api_plugins_twisuki_petcat_pc_token.md":"B1O2CkQG","en_dev_api_tools_marshoai_bangumi_index.md":"DWnmN-I6","en_dev_api_tools_marshoai_basic_index.md":"D9JkVPMg","en_dev_api_tools_marshoai_megakits_index.md":"CgWeHxOT","en_dev_api_tools_marshoai_megakits_mk_common.md":"P8V5KFZ7","en_dev_api_tools_marshoai_megakits_mk_info.md":"tcfMikuj","en_dev_api_tools_marshoai_megakits_mk_morse_code.md":"xggXCxLJ","en_dev_api_tools_marshoai_megakits_mk_nya_code.md":"G9HPWVtZ","en_dev_api_tools_marshoai_memory_index.md":"BoTJbgVx","en_dev_api_tools_marshoai_meogirl_index.md":"CAicnthU","en_dev_api_tools_marshoai_meogirl_mg_info.md":"BFLggEu0","en_dev_api_tools_marshoai_meogirl_mg_introduce.md":"lyFmddfe","en_dev_api_tools_marshoai_meogirl_mg_search.md":"CuklbRju","en_dev_api_tools_wip_marshoai_memory_index.md":"cAEFdFDP","en_dev_api_util.md":"YXI9hCbD","en_dev_api_util_hunyuan.md":"Dn5jgbGF","en_dev_index.md":"DJJ0NGhU","en_index.md":"DAKoBz1C","en_start_index.md":"BwdTMIWE","en_start_install.md":"CshuOGRi","index.md":"DlqxtZr8","ja_index.md":"CcT0fxo3","start_index.md":"ByEtL58Q","start_install-old.md":"CXTT8MXN","start_install.md":"CNXBmrn-","start_use.md":"BiCxERjA"} +{"dev_api_azure.md":"By3DQZ1H","dev_api_azure_onebot.md":"BSzQi5NB","dev_api_config.md":"DSFD8ude","dev_api_constants.md":"CeyS-dgb","dev_api_deal_latex.md":"CliIHVQx","dev_api_dev.md":"CR8NfY8m","dev_api_hooks.md":"DpJrlEUX","dev_api_hunyuan.md":"DTtTdru3","dev_api_index.md":"DCRutF9O","dev_api_instances.md":"VkCkhorR","dev_api_marsho.md":"dF_hdEOQ","dev_api_marsho_onebot.md":"BaELa_5s","dev_api_metadata.md":"BvJb0wDC","dev_api_models.md":"CzLGyN0e","dev_api_observer.md":"CKxQ8rNr","dev_api_plugin_func_call_caller.md":"CzrTsykV","dev_api_plugin_func_call_index.md":"DSbV-DHP","dev_api_plugin_func_call_models.md":"CYOWq9i6","dev_api_plugin_func_call_params.md":"DIr0Wfuh","dev_api_plugin_func_call_utils.md":"CBpuIEsL","dev_api_plugin_index.md":"BpLPZBto","dev_api_plugin_load.md":"Z1_AJpA-","dev_api_plugin_models.md":"XO9ZgJTV","dev_api_plugin_register.md":"wxtxwL1q","dev_api_plugin_typing.md":"B_OdqvYr","dev_api_plugin_utils.md":"CKZ8uSFc","dev_api_plugins_builtin_tools_chat.md":"CX5fWmLQ","dev_api_plugins_builtin_tools_file_io.md":"B4WB3kMa","dev_api_plugins_builtin_tools_index.md":"CdVyaR56","dev_api_plugins_builtin_tools_liteyuki.md":"C2jQUuMC","dev_api_plugins_builtin_tools_manager.md":"CSx6-DqR","dev_api_plugins_builtin_tools_network.md":"qwTduvJA","dev_api_plugins_builtin_tools_utils.md":"BQ_zIszy","dev_api_plugins_marshoai_bangumi_index.md":"DI0wDzaI","dev_api_plugins_marshoai_basic_index.md":"CdMZUtoa","dev_api_plugins_test_marshoai_basic_index.md":"xGCd7eZm","dev_api_plugins_test_marshoai_memory_command.md":"CeJIbyf1","dev_api_plugins_test_marshoai_memory_config.md":"CtBtnl-b","dev_api_plugins_test_marshoai_memory_index.md":"wgRBaFEj","dev_api_plugins_test_random_number_generator.md":"CP2ZOHnt","dev_api_plugins_test_snowykami_testplugin_index.md":"DGUrAa-4","dev_api_plugins_test_weather_demo.md":"BhjRtDMw","dev_api_plugins_twisuki_megakits_index.md":"Dhj0Q_rd","dev_api_plugins_twisuki_megakits_mk_morse_code.md":"BPtKSrvY","dev_api_plugins_twisuki_megakits_mk_nya_code.md":"BDLuQWQj","dev_api_plugins_twisuki_petcat_index.md":"Db-1fmpK","dev_api_plugins_twisuki_petcat_pc_cat.md":"F2sC91-N","dev_api_plugins_twisuki_petcat_pc_info.md":"CvN9sngp","dev_api_plugins_twisuki_petcat_pc_shop.md":"DD4ahNPm","dev_api_plugins_twisuki_petcat_pc_token.md":"DA_UlEtw","dev_api_tools_marshoai_bangumi_index.md":"DBTSrMfh","dev_api_tools_marshoai_basic_index.md":"DzBLEWLC","dev_api_tools_marshoai_megakits_index.md":"REZMb3dg","dev_api_tools_marshoai_megakits_mk_common.md":"7APNTo8M","dev_api_tools_marshoai_megakits_mk_info.md":"ChkkoB5W","dev_api_tools_marshoai_megakits_mk_morse_code.md":"0M_XvS3m","dev_api_tools_marshoai_megakits_mk_nya_code.md":"c9sb8PmU","dev_api_tools_marshoai_memory_index.md":"CIRx5tJY","dev_api_tools_marshoai_meogirl_index.md":"XEkcu-t2","dev_api_tools_marshoai_meogirl_mg_info.md":"DPN0C8WV","dev_api_tools_marshoai_meogirl_mg_introduce.md":"BlzX94DI","dev_api_tools_marshoai_meogirl_mg_search.md":"BBTMELq_","dev_api_tools_wip_marshoai_memory_index.md":"Dm4TJCvU","dev_api_util.md":"Bph2gkvc","dev_api_util_hunyuan.md":"Dw50YpRa","dev_extension.md":"sCH8l0Kd","dev_index.md":"DmkkcOvS","dev_project.md":"si_Q_Qol","en_dev_api_azure.md":"Cto4HxOQ","en_dev_api_azure_onebot.md":"Nh5j0O6E","en_dev_api_config.md":"DFsolamx","en_dev_api_constants.md":"0iXpq-Ec","en_dev_api_deal_latex.md":"CoDpC8c1","en_dev_api_dev.md":"ZX87ppE0","en_dev_api_hooks.md":"BCTjt9JT","en_dev_api_hunyuan.md":"CAln-sCp","en_dev_api_index.md":"PTQTSFQN","en_dev_api_instances.md":"qxOeS8ME","en_dev_api_marsho.md":"D_PLwYjH","en_dev_api_marsho_onebot.md":"Bp39oSfi","en_dev_api_metadata.md":"BMq5AAe8","en_dev_api_models.md":"BPby54j6","en_dev_api_observer.md":"oTjjwmjn","en_dev_api_plugin_func_call_caller.md":"Bye_Nxpk","en_dev_api_plugin_func_call_index.md":"DWsorYJh","en_dev_api_plugin_func_call_models.md":"B-qnd7cH","en_dev_api_plugin_func_call_params.md":"u__hMe93","en_dev_api_plugin_func_call_utils.md":"iU5-nBge","en_dev_api_plugin_index.md":"BZIGSQUL","en_dev_api_plugin_load.md":"XwjzFCnp","en_dev_api_plugin_models.md":"KoVIfTB6","en_dev_api_plugin_register.md":"Duq9hOxH","en_dev_api_plugin_typing.md":"C2zfOXEp","en_dev_api_plugin_utils.md":"e5Btmrql","en_dev_api_plugins_builtin_tools_chat.md":"C23GjQBb","en_dev_api_plugins_builtin_tools_file_io.md":"C08lWCZX","en_dev_api_plugins_builtin_tools_index.md":"DbJ5EqSA","en_dev_api_plugins_builtin_tools_liteyuki.md":"x_VmenLc","en_dev_api_plugins_builtin_tools_manager.md":"u-0hfdOm","en_dev_api_plugins_builtin_tools_network.md":"CnxMIDLE","en_dev_api_plugins_builtin_tools_utils.md":"wCwWvzS9","en_dev_api_plugins_marshoai_bangumi_index.md":"DBU2Zi62","en_dev_api_plugins_marshoai_basic_index.md":"DyXm3jCh","en_dev_api_plugins_test_marshoai_basic_index.md":"DuyU21n7","en_dev_api_plugins_test_marshoai_memory_command.md":"u25QWY_i","en_dev_api_plugins_test_marshoai_memory_config.md":"fO2hq1Zg","en_dev_api_plugins_test_marshoai_memory_index.md":"C45XsXpP","en_dev_api_plugins_test_random_number_generator.md":"BbS1YDsu","en_dev_api_plugins_test_snowykami_testplugin_index.md":"QqX2hUew","en_dev_api_plugins_test_weather_demo.md":"CkQsPcOc","en_dev_api_plugins_twisuki_megakits_index.md":"DI9uZZaT","en_dev_api_plugins_twisuki_megakits_mk_morse_code.md":"CR7E4O63","en_dev_api_plugins_twisuki_megakits_mk_nya_code.md":"nvZAi5el","en_dev_api_plugins_twisuki_petcat_index.md":"Df3A8uE4","en_dev_api_plugins_twisuki_petcat_pc_cat.md":"CwByAWa2","en_dev_api_plugins_twisuki_petcat_pc_info.md":"C3tuga99","en_dev_api_plugins_twisuki_petcat_pc_shop.md":"CUZ6lawY","en_dev_api_plugins_twisuki_petcat_pc_token.md":"B1O2CkQG","en_dev_api_tools_marshoai_bangumi_index.md":"DWnmN-I6","en_dev_api_tools_marshoai_basic_index.md":"D9JkVPMg","en_dev_api_tools_marshoai_megakits_index.md":"CgWeHxOT","en_dev_api_tools_marshoai_megakits_mk_common.md":"P8V5KFZ7","en_dev_api_tools_marshoai_megakits_mk_info.md":"tcfMikuj","en_dev_api_tools_marshoai_megakits_mk_morse_code.md":"xggXCxLJ","en_dev_api_tools_marshoai_megakits_mk_nya_code.md":"G9HPWVtZ","en_dev_api_tools_marshoai_memory_index.md":"BoTJbgVx","en_dev_api_tools_marshoai_meogirl_index.md":"CAicnthU","en_dev_api_tools_marshoai_meogirl_mg_info.md":"BFLggEu0","en_dev_api_tools_marshoai_meogirl_mg_introduce.md":"lyFmddfe","en_dev_api_tools_marshoai_meogirl_mg_search.md":"CuklbRju","en_dev_api_tools_wip_marshoai_memory_index.md":"cAEFdFDP","en_dev_api_util.md":"YXI9hCbD","en_dev_api_util_hunyuan.md":"Dn5jgbGF","en_dev_index.md":"DJJ0NGhU","en_index.md":"DAKoBz1C","en_start_index.md":"BwdTMIWE","en_start_install.md":"CshuOGRi","index.md":"DlqxtZr8","ja_index.md":"CcT0fxo3","start_index.md":"ByEtL58Q","start_install-old.md":"CXTT8MXN","start_install.md":"CNXBmrn-","start_use.md":"HknkOvSZ"} diff --git a/index.html b/index.html index fb7ed553..a43dbaef 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@
    Skip to content

    小棉智能猫娘机器人

    可爱,智能且可扩展的AI服务插件

    Marsho LogoMarsho Logo

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/ja/index.html b/ja/index.html index 2cdc13f0..151932b3 100644 --- a/ja/index.html +++ b/ja/index.html @@ -20,7 +20,7 @@
    Skip to content

    小綿智能猫娘ロボット

    かわいくて、賢くて、拡張可能なAIサービスプラグイン

    MarshoロゴMarshoロゴ

    ドキュメントは改善中です。ご意見をお待ちしております。

    - + \ No newline at end of file diff --git a/start/index.html b/start/index.html index e6bee8b9..b0e6f7a5 100644 --- a/start/index.html +++ b/start/index.html @@ -20,7 +20,7 @@
    Skip to content

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/start/install-old.html b/start/install-old.html index fe9a5272..3158330b 100644 --- a/start/install-old.html +++ b/start/install-old.html @@ -38,7 +38,7 @@ ... ] }

    ⚙️ 可配置项

    在 nonebot2 项目的.env文件中添加下表中的配置

    插件行为

    配置项类型默认值说明
    MARSHOAI_USE_YAML_CONFIGboolfalse是否使用 YAML 配置文件格式

    Marsho 使用方式

    配置项类型默认值说明
    MARSHOAI_DEFAULT_NAMEstrmarsho调用 Marsho 默认的命令前缀
    MARSHOAI_ALIASESset[str]set{"小棉"}调用 Marsho 的命令别名
    MARSHOAI_ATboolfalse决定是否使用at触发
    MARSHOAI_MAIN_COLOURstrFEABA9主题色,部分工具和功能可用

    AI 调用

    配置项类型默认值说明
    MARSHOAI_TOKENstr调用 AI API 所需的 token
    MARSHOAI_DEFAULT_MODELstrgpt-4o-miniMarsho 默认调用的模型
    MARSHOAI_PROMPTstr猫娘 Marsho 人设提示词Marsho 的基本系统提示词 ※部分模型(o1等)不支持系统提示词。
    MARSHOAI_ADDITIONAL_PROMPTstrMarsho 的扩展系统提示词
    MARSHOAI_POKE_SUFFIXstr揉了揉你的猫耳对 Marsho 所连接的 OneBot 用户进行双击戳一戳时,构建的聊天内容。此配置项为空字符串时,戳一戳响应功能会被禁用。例如,默认值构建的聊天内容将为*[昵称]揉了揉你的猫耳。
    MARSHOAI_AZURE_ENDPOINTstrhttps://models.inference.ai.azure.comOpenAI 标准格式 API 端点
    MARSHOAI_TEMPERATUREfloatnull推理生成多样性(温度)参数
    MARSHOAI_TOP_Pfloatnull推理核采样参数
    MARSHOAI_MAX_TOKENSintnull最大生成 token 数
    MARSHOAI_ADDITIONAL_IMAGE_MODELSlist[]额外添加的支持图片的模型列表,例如hunyuan-vision

    功能开关

    配置项类型默认值说明
    MARSHOAI_ENABLE_SUPPORT_IMAGE_TIPbooltrue启用后用户发送带图请求时若模型不支持图片,则提示用户
    MARSHOAI_ENABLE_NICKNAME_TIPbooltrue启用后用户未设置昵称时提示用户设置
    MARSHOAI_ENABLE_PRAISESbooltrue是否启用夸赞名单功能
    MARSHOAI_ENABLE_TOOLSbooltrue是否启用小棉工具
    MARSHOAI_LOAD_BUILTIN_TOOLSbooltrue是否加载内置工具包
    MARSHOAI_TOOLSET_DIRlist[]外部工具集路径列表
    MARSHOAI_DISABLED_TOOLKITSlist[]禁用的工具包包名列表
    MARSHOAI_ENABLE_RICHTEXT_PARSEbooltrue是否启用自动解析消息(若包含图片链接则发送图片、若包含LaTeX公式则发送公式图)
    MARSHOAI_SINGLE_LATEX_PARSEboolfalse单行公式是否渲染(当消息富文本解析启用时可用)(如果单行也渲……只能说不好看)

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/start/install.html b/start/install.html index 06427898..5a06c5eb 100644 --- a/start/install.html +++ b/start/install.html @@ -38,7 +38,7 @@ ... ] }

    ⚙️ 可配置项

    在 nonebot2 项目的.env文件中添加下表中的配置

    插件行为

    配置项类型默认值说明
    MARSHOAI_USE_YAML_CONFIGboolfalse是否使用 YAML 配置文件格式
    MARSHOAI_DEVMODEboolfalse是否启用开发者模式

    Marsho 使用方式

    配置项类型默认值说明
    MARSHOAI_DEFAULT_NAMEstrmarsho调用 Marsho 默认的命令前缀
    MARSHOAI_ALIASESset[str]list["小棉"]调用 Marsho 的命令别名
    MARSHOAI_ATboolfalse决定是否使用at触发
    MARSHOAI_MAIN_COLOURstrFEABA9主题色,部分工具和功能可用

    AI 调用

    配置项类型默认值说明
    MARSHOAI_TOKENstr调用 AI API 所需的 token
    MARSHOAI_DEFAULT_MODELstrgpt-4o-miniMarsho 默认调用的模型
    MARSHOAI_PROMPTstr猫娘 Marsho 人设提示词Marsho 的基本系统提示词 ※部分模型(o1等)不支持系统提示词。
    MARSHOAI_ADDITIONAL_PROMPTstrMarsho 的扩展系统提示词
    MARSHOAI_ENFORCE_NICKNAMEbooltrue是否强制用户设置昵称
    MARSHOAI_POKE_SUFFIXstr揉了揉你的猫耳对 Marsho 所连接的 OneBot 用户进行双击戳一戳时,构建的聊天内容。此配置项为空字符串时,戳一戳响应功能会被禁用。例如,默认值构建的聊天内容将为*[昵称]揉了揉你的猫耳。
    MARSHOAI_AZURE_ENDPOINTstrhttps://models.inference.ai.azure.comOpenAI 标准格式 API 端点
    MARSHOAI_TEMPERATUREfloatnull推理生成多样性(温度)参数
    MARSHOAI_TOP_Pfloatnull推理核采样参数
    MARSHOAI_MAX_TOKENSintnull最大生成 token 数
    MARSHOAI_ADDITIONAL_IMAGE_MODELSlist[]额外添加的支持图片的模型列表,例如hunyuan-vision
    MARSHOAI_NICKNAME_LIMITint16昵称长度限制
    MARSHOAI_TIMEOUTfloat50AI 请求超时时间(秒)

    功能开关

    配置项类型默认值说明
    MARSHOAI_ENABLE_SUPPORT_IMAGE_TIPbooltrue启用后用户发送带图请求时若模型不支持图片,则提示用户
    MARSHOAI_ENABLE_NICKNAME_TIPbooltrue启用后用户未设置昵称时提示用户设置
    MARSHOAI_ENABLE_PRAISESbooltrue是否启用夸赞名单功能
    MARSHOAI_ENABLE_TIME_PROMPTbooltrue是否启用实时更新的日期与时间(精确到秒)与农历日期系统提示词
    MARSHOAI_ENABLE_TOOLSboolfalse是否启用小棉工具
    MARSHOAI_ENABLE_PLUGINSbooltrue是否启用小棉插件
    MARSHOAI_PLUGINSlist[str][]要从sys.path加载的插件的名称,例如从pypi安装的包
    MARSHOAI_PLUGIN_DIRSlist[str][]插件目录路径列表
    MARSHOAI_LOAD_BUILTIN_TOOLSbooltrue是否加载内置工具包
    MARSHOAI_TOOLSET_DIRlist[]外部工具集路径列表
    MARSHOAI_DISABLED_TOOLKITSlist[]禁用的工具包包名列表
    MARSHOAI_ENABLE_RICHTEXT_PARSEbooltrue是否启用自动解析消息(若包含图片链接则发送图片、若包含LaTeX公式则发送公式图)
    MARSHOAI_SINGLE_LATEX_PARSEboolfalse单行公式是否渲染(当消息富文本解析启用时可用)(如果单行也渲……只能说不好看)
    MARSHOAI_FIX_TOOLCALLSbooltrue是否修复工具调用(部分模型须关闭,使用 vLLM 部署的模型时须关闭)
    MARSHOAI_SEND_THINKINGbooltrue是否发送思维链(部分模型不支持)

    开发及调试选项

    配置项类型默认值说明
    MARSHOAI_DEVMODEboolfalse是否启用开发者模式

    文档完善中,欢迎提出建议或帮助我们完善。

    - + \ No newline at end of file diff --git a/start/use.html b/start/use.html index dc6d6fd6..93e99d12 100644 --- a/start/use.html +++ b/start/use.html @@ -13,14 +13,16 @@ - + -
    Skip to content

    安装

    使用

    API 部署

    本插件推荐使用 one-api 作为中转以调用 LLM。

    配置调整

    本插件理论上可兼容大部分可通过 OpenAI 兼容 API 调用的 LLM,部分模型可能需要调整插件配置。

    例如:

    • 对于不支持 Function Call 的模型(Cohere Command R等):
      dotenv
      MARSHOAI_ENABLE_PLUGINS=false
      -MARSHOAI_ENABLE_TOOLS=false
    • 对于支持图片处理的模型(hunyuan-vision等):
      dotenv
      MARSHOAI_ADDITIONAL_IMAGE_MODELS=["hunyuan-vision"]

    使用 vLLM 部署本地模型

    你可使用 vLLM 部署一个本地 LLM,并使用 OpenAI 兼容 API 调用。
    本文档以 Qwen2.5-7B-Instruct-GPTQ-Int4 模型及 Muice-Chatbot 提供的 LoRA 微调模型为例,并假设你的系统及硬件可运行 vLLM。

    WARNING

    vLLM 仅支持 Linux 系统。

    1. 安装 vLLM
      bash
      pip install vllm
    2. 下载 Muice-Chatbot 提供的 LoRA 微调模型
      前往 Muice-Chatbot 的 Releases 下载模型文件。此处以2.7.1版本的模型为例。
      bash
      wget https://github.com/Moemu/Muice-Chatbot/releases/download/1.4/Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4.7z
    3. 解压模型文件
      bash
      7z x Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4.7z -oMuice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4
    4. 启动 vLLM
      bash
      vllm serve Qwen/Qwen2.5-7B-Instruct-GPTQ-Int4 \
      +    
      Skip to content

      安装

      使用

      API 部署

      本插件推荐使用 one-api 作为中转以调用 LLM。

      配置调整

      本插件理论上可兼容大部分可通过 OpenAI 兼容 API 调用的 LLM,部分模型可能需要调整插件配置。

      例如:

      • 对于不支持 Function Call 的模型(Cohere Command R,DeepSeek-R1等):
        dotenv
        MARSHOAI_ENABLE_PLUGINS=false
        +MARSHOAI_ENABLE_TOOLS=false
      • 对于支持图片处理的模型(hunyuan-vision等):
        dotenv
        MARSHOAI_ADDITIONAL_IMAGE_MODELS=["hunyuan-vision"]

      使用 DeepSeek-R1 模型

      MarshoAI 兼容 DeepSeek-R1 模型,你可通过以下步骤来使用:

      1. 获取 API Key
        前往此处获取 API Key。
      2. 配置插件
        dotenv
        MARSHOAI_TOKEN="<你的 API Key>"
        +MARSHOAI_AZURE_ENDPOINT="https://api.deepseek.com"
        +MARSHOAI_DEFAULT_MODEL="deepseek-reasoner"
        你可修改 MARSHOAI_DEFAULT_MODEL 为 其它模型名来调用其它 DeepSeek 模型。

        TIP

        如果使用 one-api 作为中转,你可将 MARSHOAI_AZURE_ENDPOINT 设置为 one-api 的地址,将 MARSHOAI_TOKEN 设为 one-api 配置的令牌,在 one-api 中添加 DeepSeek 渠道。

      使用 vLLM 部署本地模型

      你可使用 vLLM 部署一个本地 LLM,并使用 OpenAI 兼容 API 调用。
      本文档以 Qwen2.5-7B-Instruct-GPTQ-Int4 模型及 Muice-Chatbot 提供的 LoRA 微调模型为例,并假设你的系统及硬件可运行 vLLM。

      WARNING

      vLLM 仅支持 Linux 系统。

      1. 安装 vLLM
        bash
        pip install vllm
      2. 下载 Muice-Chatbot 提供的 LoRA 微调模型
        前往 Muice-Chatbot 的 Releases 下载模型文件。此处以2.7.1版本的模型为例。
        bash
        wget https://github.com/Moemu/Muice-Chatbot/releases/download/1.4/Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4.7z
      3. 解压模型文件
        bash
        7z x Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4.7z -oMuice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4
      4. 启动 vLLM
        bash
        vllm serve Qwen/Qwen2.5-7B-Instruct-GPTQ-Int4 \
             --enable-lora \
             --lora-modules '{"name": "muice-lora", "path": "/root/Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4", "base_model_name": "Qwen/Qwen2.5-7B-Instruct-GPTQ-Int4"}' \
             --port 6006
        此示例命令将在 6006 端口启动 vLLM,并加载 Muice-Chatbot 提供的 LoRA 微调模型,该模型位于 /root/Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4 目录下。
      5. 配置插件
        dotenv
        MARSHOAI_AZURE_ENDPOINT="http://127.0.0.1:6006/v1"
        @@ -29,8 +31,8 @@
         MARSHOAI_DEFAULT_MODEL="muice-lora"
         MARSHOAI_PROMPT="现在开始你是一个名为的“沐雪”的AI女孩子,开发者是“沐沐”并住在(沐沐)的机箱里。现在正在努力成为一个合格的VTuber(虚拟主播)并尝试和观众打成一片,以下是你的设定:样貌:有着一头粉白色的长发和一双明亮的大眼睛,喜欢穿日系JK或者是Lolita;喜欢的颜色:浅粉色;性格特征:纯真无邪是沐雪最基本的性格特征之一。即使面对复杂的情境,她也总能保持善良、天真之感。而且,她喜欢倾听别人倾述自己生活中发生的各种事情,在别人需要的时候,能够及时地安慰别人;语言风格:沐雪说话轻快愉悦,充满同情心,富有人情味,有时候会用俏皮话调侃自己和他人"
        (可选) 修改调用方式
        dotenv
        MARSHOAI_DEFAULT_NAME="muice"
         MARSHOAI_ALIASES=["沐雪"]
      6. 测试聊天
      > muice 你是谁
      -我是沐雪,我的使命是传播爱与和平。

      文档完善中,欢迎提出建议或帮助我们完善。

      - +我是沐雪,我的使命是传播爱与和平。

    文档完善中,欢迎提出建议或帮助我们完善。

    + \ No newline at end of file