diff --git a/404.html b/404.html index cc959a1..d59fab2 100644 --- a/404.html +++ b/404.html @@ -17,7 +17,7 @@
- + \ No newline at end of file diff --git a/dev/api/_types.html b/dev/api/_types.html index bf7848b..1d062e6 100644 --- a/dev/api/_types.html +++ b/dev/api/_types.html @@ -23,8 +23,8 @@ def __init__(self, *, content: Optional[str]=None): ...

@overload

func __init__(self, mapping: Mapping[str, Any])

说明: :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any]

源代码在GitHub上查看
python
@overload
 def __init__(self, mapping: Mapping[str, Any]):

func __init__(self, *args: Any, **kwargs: Any) -> None

源代码在GitHub上查看
python
def __init__(self, *args: Any, **kwargs: Any) -> None:
-    super().__init__(*args, role='developer', **kwargs)

attr role: Literal['developer'] = rest_discriminator(name='role')

attr content: Optional[str] = rest_field()

- + super().__init__(*args, role='developer', **kwargs)

attr role: Literal['developer'] = rest_discriminator(name='role')

attr content: Optional[str] = rest_field()

+ \ No newline at end of file diff --git a/dev/api/azure.html b/dev/api/azure.html index 5631935..c93ce8f 100644 --- a/dev/api/azure.html +++ b/dev/api/azure.html @@ -179,8 +179,8 @@ except Exception as e: await UniMessage(str(e) + suggest_solution(str(e))).send() traceback.print_exc() - return

var text

- + return

var text

+ \ No newline at end of file diff --git a/dev/api/azure_onebot.html b/dev/api/azure_onebot.html index c4f0b3d..1530cbc 100644 --- a/dev/api/azure_onebot.html +++ b/dev/api/azure_onebot.html @@ -19,8 +19,8 @@ -
Skip to content

模块 nonebot_plugin_marshoai.azure_onebot

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

- +
Skip to content

模块 nonebot_plugin_marshoai.azure_onebot

+ \ No newline at end of file diff --git a/dev/api/cache/decos.html b/dev/api/cache/decos.html index fbd83c5..10cceb1 100644 --- a/dev/api/cache/decos.html +++ b/dev/api/cache/decos.html @@ -41,8 +41,8 @@ cache.set(key, result) return result return wrapper - return decorator - + return decorator + \ No newline at end of file diff --git a/dev/api/config.html b/dev/api/config.html index f91dc6a..cb93c53 100644 --- a/dev/api/config.html +++ b/dev/api/config.html @@ -40,8 +40,8 @@ else: logger.info(f'新增配置项: {key} = {value}') existing_cfg[key] = value - return existing_cfg - + return existing_cfg + \ No newline at end of file diff --git a/dev/api/constants.html b/dev/api/constants.html index 5a81d7d..4a0a8b5 100644 --- a/dev/api/constants.html +++ b/dev/api/constants.html @@ -19,8 +19,8 @@ -
Skip to content

模块 nonebot_plugin_marshoai.constants

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

- +
Skip to content

模块 nonebot_plugin_marshoai.constants

+ \ No newline at end of file diff --git a/dev/api/deal_latex.html b/dev/api/deal_latex.html index bd82036..7c725c9 100644 --- a/dev/api/deal_latex.html +++ b/dev/api/deal_latex.html @@ -113,8 +113,8 @@ return (score, channel) 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

- + 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 e8c54d2..36d05cf 100644 --- a/dev/api/dev.html +++ b/dev/api/dev.html @@ -63,8 +63,8 @@ break else: logger.debug('未找到变动插件') - return

var dir_list

- + return

var dir_list

+ \ No newline at end of file diff --git a/dev/api/handler.html b/dev/api/handler.html index 692d85b..ee1c293 100644 --- a/dev/api/handler.html +++ b/dev/api/handler.html @@ -97,8 +97,8 @@ return await self.handle_function_call(response, user_message, model_name, tools_list) else: await UniMessage(f'意外的完成原因:{choice.finish_reason}').send() - return None - + return None + \ No newline at end of file diff --git a/dev/api/hooks.html b/dev/api/hooks.html index 8d4ff06..36cbf66 100644 --- a/dev/api/hooks.html +++ b/dev/api/hooks.html @@ -29,8 +29,8 @@ else: 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

- + 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 4bd8fb8..5ab4c2c 100644 --- a/dev/api/hunyuan.html +++ b/dev/api/hunyuan.html @@ -28,8 +28,8 @@ url = json.loads(result)['ResultImage'] await UniMessage.image(url=url).send() except Exception as e: - traceback.print_exc() - + traceback.print_exc() + \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 0fd7248..4315751 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -19,8 +19,8 @@ -
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.

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

- +
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 efac47a..37c84f6 100644 --- a/dev/api/instances.html +++ b/dev/api/instances.html @@ -19,8 +19,8 @@ -
Skip to content

模块 nonebot_plugin_marshoai.instances

var target_list

  • 说明: 记录需保存历史上下文的列表

  • 类型: list[list]

  • 默认值: []

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

- +
Skip to content

模块 nonebot_plugin_marshoai.instances

var target_list

  • 说明: 记录需保存历史上下文的列表

  • 类型: list[list]

  • 默认值: []

+ \ No newline at end of file diff --git a/dev/api/marsho.html b/dev/api/marsho.html index a386a93..2ec9fe5 100644 --- a/dev/api/marsho.html +++ b/dev/api/marsho.html @@ -131,8 +131,8 @@ except Exception as e: await UniMessage(str(e) + suggest_solution(str(e))).send() traceback.print_exc() - return

var text

- + return

var text

+ \ No newline at end of file diff --git a/dev/api/marsho_onebot.html b/dev/api/marsho_onebot.html index beeebd8..47f88a3 100644 --- a/dev/api/marsho_onebot.html +++ b/dev/api/marsho_onebot.html @@ -19,8 +19,8 @@ -
Skip to content

模块 nonebot_plugin_marshoai.marsho_onebot

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

- +
Skip to content

模块 nonebot_plugin_marshoai.marsho_onebot

+ \ No newline at end of file diff --git a/dev/api/metadata.html b/dev/api/metadata.html index 37da4c8..8a6d00c 100644 --- a/dev/api/metadata.html +++ b/dev/api/metadata.html @@ -19,8 +19,8 @@ -
Skip to content

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

- +
Skip to content
+ \ No newline at end of file diff --git a/dev/api/models.html b/dev/api/models.html index 28b5cc6..fa3625f 100644 --- a/dev/api/models.html +++ b/dev/api/models.html @@ -71,8 +71,8 @@ return False

func get_tools_list(self)

源代码在GitHub上查看
python
def get_tools_list(self):
     if not self.tools_list or not config.marshoai_enable_tools:
         return None
-    return self.tools_list
- + return self.tools_list + \ No newline at end of file diff --git a/dev/api/observer.html b/dev/api/observer.html index 8af5783..a3be21b 100644 --- a/dev/api/observer.html +++ b/dev/api/observer.html @@ -54,8 +54,8 @@ for directory in directories: observer.schedule(code_modified_handler, directory, recursive=recursive) return func - return decorator - + 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 6c3d7dc..6c3788a 100644 --- a/dev/api/plugin/func_call/caller.html +++ b/dev/api/plugin/func_call/caller.html @@ -123,8 +123,8 @@ return f'{self.full_name}({self._description})'

func on_function_call(name: str = '', description: str | None = None, func_type: str = 'function', no_module_name: bool = False) -> Caller

参数:

返回: Caller: Caller对象

源代码在GitHub上查看
python
def on_function_call(name: str='', description: str | None=None, func_type: str='function', no_module_name: bool=False) -> Caller:
     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
- + 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 f89abdc..05a7111 100644 --- a/dev/api/plugin/func_call/index.html +++ b/dev/api/plugin/func_call/index.html @@ -19,8 +19,8 @@ -
Skip to content

模块 nonebot_plugin_marshoai.plugin.func_call

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

- +
Skip to content

模块 nonebot_plugin_marshoai.plugin.func_call

+ \ 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 c07a27b..4acaa01 100644 --- a/dev/api/plugin/func_call/models.html +++ b/dev/api/plugin/func_call/models.html @@ -19,8 +19,8 @@ -
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 | None = 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 caller: str | None = None

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

- +
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 | None = 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 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 f1b3956..b911cef 100644 --- a/dev/api/plugin/func_call/params.html +++ b/dev/api/plugin/func_call/params.html @@ -22,8 +22,8 @@
Skip to content

模块 nonebot_plugin_marshoai.plugin.func_call.params

var P

  • 说明: 参数类型泛型

  • 默认值: TypeVar('P', bound='Parameter')

class ParamTypes

attr STRING = 'string'

attr INTEGER = 'integer'

attr ARRAY = 'array'

attr OBJECT = 'object'

attr BOOLEAN = 'boolean'

attr NUMBER = 'number'

class Parameter(BaseModel)


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

源代码在GitHub上查看
python
def data(self) -> dict[str, Any]:
     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] = {}

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

- + 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 8eee0c7..2789b56 100644 --- a/dev/api/plugin/func_call/utils.html +++ b/dev/api/plugin/func_call/utils.html @@ -38,8 +38,8 @@ if inspect.isclass(call): return False func_ = getattr(call, '__call__', None) - return inspect.iscoroutinefunction(func_) - + 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 33f224b..647eb2c 100644 --- a/dev/api/plugin/index.html +++ b/dev/api/plugin/index.html @@ -19,8 +19,8 @@ -
Skip to content

模块 nonebot_plugin_marshoai.plugin

该功能目前正在开发中开发基本完成,暂时可用,受影响的文件夹 plugin, plugins

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

- +
Skip to content

模块 nonebot_plugin_marshoai.plugin

该功能目前正在开发中开发基本完成,暂时可用,受影响的文件夹 plugin, plugins

+ \ No newline at end of file diff --git a/dev/api/plugin/load.html b/dev/api/plugin/load.html index 2c4be12..2ce3dac 100644 --- a/dev/api/plugin/load.html +++ b/dev/api/plugin/load.html @@ -68,8 +68,8 @@ except Exception as e: logger.opt(colors=True).error(f'重新加载插件失败 "<r>{plugin.name}</r>"') traceback.print_exc() - return None

var module

var module_name

var module_name

- + 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 7fea22b..6db354d 100644 --- a/dev/api/plugin/models.html +++ b/dev/api/plugin/models.html @@ -21,8 +21,8 @@
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

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

- + 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 325e9bd..519f1a6 100644 --- a/dev/api/plugin/register.html +++ b/dev/api/plugin/register.html @@ -28,8 +28,8 @@ function_call = get_function_info(func)

func get_function_info(func: FUNCTION_CALL_FUNC)

说明: 获取函数信息

参数:

返回: FunctionCall: 函数信息对象模型

源代码在GitHub上查看
python
def get_function_info(func: FUNCTION_CALL_FUNC):
     name = func.__name__
     description = func.__doc__
-    logger.info(f'注册函数: {name} {description}')
- + 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 037dbbf..594d1e4 100644 --- a/dev/api/plugin/typing.html +++ b/dev/api/plugin/typing.html @@ -19,8 +19,8 @@ -
Skip to content

模块 nonebot_plugin_marshoai.plugin.typing

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

- +
Skip to content

模块 nonebot_plugin_marshoai.plugin.typing

+ \ No newline at end of file diff --git a/dev/api/plugin/utils.html b/dev/api/plugin/utils.html index cacdf6b..d9a158b 100644 --- a/dev/api/plugin/utils.html +++ b/dev/api/plugin/utils.html @@ -25,8 +25,8 @@ return '.'.join(rel_path.parts[:-1]) else: return '.'.join(rel_path.parts[:-1] + (rel_path.stem,))

func parse_function_docsring()

源代码在GitHub上查看
python
def parse_function_docsring():
-    pass
- + 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 166132d..ee2fc43 100644 --- a/dev/api/plugins/builtin_tools/chat.html +++ b/dev/api/plugins/builtin_tools/chat.html @@ -42,8 +42,8 @@ except FinishedException as e: return '发送完成' except Exception as e: - return '发送失败: ' + str(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 3d6017e..f1be1f2 100644 --- a/dev/api/plugins/builtin_tools/file_io.html +++ b/dev/api/plugins/builtin_tools/file_io.html @@ -32,8 +32,8 @@ await f.write(content) return '写入成功' except Exception as e: - return '写入出错: ' + str(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 c1b60bc..d96f08d 100644 --- a/dev/api/plugins/builtin_tools/index.html +++ b/dev/api/plugins/builtin_tools/index.html @@ -19,8 +19,8 @@ -
Skip to content

模块 nonebot_plugin_marshoai.plugins.builtin_tools

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

- +
Skip to content

模块 nonebot_plugin_marshoai.plugins.builtin_tools

+ \ 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 27cb329..39dc6e9 100644 --- a/dev/api/plugins/builtin_tools/liteyuki.html +++ b/dev/api/plugins/builtin_tools/liteyuki.html @@ -28,8 +28,8 @@ register = response.json().get('register') response = await client.get('https://api.liteyuki.icu/online') online = response.json().get('online') - return f'注册节点数: {register}\n在线节点数: {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 a8fe70c..39350cd 100644 --- a/dev/api/plugins/builtin_tools/manager.html +++ b/dev/api/plugins/builtin_tools/manager.html @@ -27,8 +27,8 @@ reply += f'名称: {p.metadata.name},描述: {p.metadata.description}\n' else: reply += f'名称: {p.name},描述: 暂无\n' - return reply - + 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 c8a8447..8a32eff 100644 --- a/dev/api/plugins/builtin_tools/network.html +++ b/dev/api/plugins/builtin_tools/network.html @@ -39,8 +39,8 @@ except Exception as e: logger.error(f'marsho builtin: 获取网页内容失败: {e}') return '获取网页内容失败:' + str(e) - return '未能获取到有效的网页内容' - + 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 7996d7b..dde954c 100644 --- a/dev/api/plugins/builtin_tools/utils.html +++ b/dev/api/plugins/builtin_tools/utils.html @@ -21,8 +21,8 @@
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)

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

- + 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 ee5fcf7..7b99aa6 100644 --- a/dev/api/plugins/marshoai_bangumi/index.html +++ b/dev/api/plugins/marshoai_bangumi/index.html @@ -46,8 +46,8 @@ return info except Exception as e: traceback.print_exc() - return '' - + 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 f5b0e75..0aa0d7b 100644 --- a/dev/api/plugins/marshoai_basic/index.html +++ b/dev/api/plugins/marshoai_basic/index.html @@ -29,8 +29,8 @@ current_weekday_name = weekdays[current_weekday] current_lunar_date = DateTime.now().to_lunar().date_hanzify()[5:] time_prompt = f'现在的时间是{current_time}{current_weekday_name},农历{current_lunar_date}。' - return time_prompt - + 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 2431b3f..6d30299 100644 --- a/dev/api/plugins/twisuki_megakits/index.html +++ b/dev/api/plugins/twisuki_megakits/index.html @@ -27,8 +27,8 @@ async def nya_encrypt(msg: str) -> str: 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))
- + 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 d078d16..03a9562 100644 --- a/dev/api/plugins/twisuki_megakits/mk_morse_code.html +++ b/dev/api/plugins/twisuki_megakits/mk_morse_code.html @@ -37,8 +37,8 @@ result += MorseDecode[element] else: result += '?' - return 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 b20b3d4..6f6b016 100644 --- a/dev/api/plugins/twisuki_megakits/mk_nya_code.html +++ b/dev/api/plugins/twisuki_megakits/mk_nya_code.html @@ -54,8 +54,8 @@ result = base64.b64decode(b64str.encode()).decode() except Exception: return '翻译失败' - return result

var char

var char

var char

var char

var char

- + 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 e4dc03d..d4b8bb6 100644 --- a/dev/api/plugins/twisuki_petcat/index.html +++ b/dev/api/plugins/twisuki_petcat/index.html @@ -35,8 +35,8 @@ async def help_cat_type() -> str: 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()
- + 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 bdacf8a..a3cfcae 100644 --- a/dev/api/plugins/twisuki_petcat/pc_cat.html +++ b/dev/api/plugins/twisuki_petcat/pc_cat.html @@ -125,8 +125,8 @@ data['health'] = min(data['health'] + 8, 127) data['energy'] = min(data['energy'] + 16, 0) token = dict_to_token(data) - return f'''你抱猫休息了一阵子, 猫猫的活力值提升到了{value_output(data['energy'])}\n新token : "{token}"\n请妥善保存token, 这是猫猫的唯一标识符!''' - + 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 995a10e..90edd32 100644 --- a/dev/api/plugins/twisuki_petcat/pc_info.html +++ b/dev/api/plugins/twisuki_petcat/pc_info.html @@ -41,8 +41,8 @@ result += f'{SKILL_LIST[index]}, ' 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()}'
- + 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 40b80fb..46d422d 100644 --- a/dev/api/plugins/twisuki_petcat/pc_shop.html +++ b/dev/api/plugins/twisuki_petcat/pc_shop.html @@ -19,8 +19,8 @@ -
Skip to content

模块 nonebot_plugin_marshoai.plugins.twisuki_petcat.pc_shop

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

- +
Skip to content

模块 nonebot_plugin_marshoai.plugins.twisuki_petcat.pc_shop

+ \ 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 48d8156..8c71d8d 100644 --- a/dev/api/plugins/twisuki_petcat/pc_token.html +++ b/dev/api/plugins/twisuki_petcat/pc_token.html @@ -119,8 +119,8 @@ token_byte = bool_to_byte(code) token = base64.b64encode(token_byte).decode() logger.success(f'编码完成, token为\n{token}') - return 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 ff3436e..c141d15 100644 --- a/dev/api/plugins_test/marshoai_basic/index.html +++ b/dev/api/plugins_test/marshoai_basic/index.html @@ -23,8 +23,8 @@ async def get_current_time() -> str: 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 - + 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 3cb239e..b252075 100644 --- a/dev/api/plugins_test/marshoai_memory/command.html +++ b/dev/api/plugins_test/marshoai_memory/command.html @@ -37,8 +37,8 @@ with open(memory_path, 'w', encoding='utf-8') as f: json.dump(memory_data, f, ensure_ascii=False, indent=4) await matcher.finish('记忆已重置~') - 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 9a028db..9906984 100644 --- a/dev/api/plugins_test/marshoai_memory/config.html +++ b/dev/api/plugins_test/marshoai_memory/config.html @@ -19,8 +19,8 @@ -
Skip to content

模块 nonebot_plugin_marshoai.plugins_test.marshoai_memory.config

class ConfigModel(BaseModel)

attr marshoai_plugin_memory_scheduler: bool = True

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

- +
Skip to content

模块 nonebot_plugin_marshoai.plugins_test.marshoai_memory.config

class ConfigModel(BaseModel)

attr marshoai_plugin_memory_scheduler: bool = True

+ \ 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 d78db36..b8f7776 100644 --- a/dev/api/plugins_test/marshoai_memory/index.html +++ b/dev/api/plugins_test/marshoai_memory/index.html @@ -48,8 +48,8 @@ except AttributeError: 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

- + 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 f38f499..677d60b 100644 --- a/dev/api/plugins_test/random_number_generator.html +++ b/dev/api/plugins_test/random_number_generator.html @@ -24,8 +24,8 @@ random_numbers = [random.randint(1, 100) for _ in range(count)] 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
- + 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 f949bc4..8c4d62f 100644 --- a/dev/api/plugins_test/snowykami_testplugin/index.html +++ b/dev/api/plugins_test/snowykami_testplugin/index.html @@ -42,8 +42,8 @@ r = os.popen(command).read() except Exception as e: return '运行出错: ' + str(e) - return '运行成功: ' + str(r) - + 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 f1ec048..dfae051 100644 --- a/dev/api/plugins_test/weather_demo.html +++ b/dev/api/plugins_test/weather_demo.html @@ -21,8 +21,8 @@
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'

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

- + 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 1715501..ebb246b 100644 --- a/dev/api/tools/marshoai_bangumi/index.html +++ b/dev/api/tools/marshoai_bangumi/index.html @@ -39,8 +39,8 @@ return info except Exception as e: traceback.print_exc() - return '' - + 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 a835e8f..d798fe2 100644 --- a/dev/api/tools/marshoai_basic/index.html +++ b/dev/api/tools/marshoai_basic/index.html @@ -24,8 +24,8 @@ ver = os.popen('uname -a').read() 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('{干支年}{生肖}{月份}{日期}日'))
- + 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 d161339..13054b4 100644 --- a/dev/api/tools/marshoai_megakits/index.html +++ b/dev/api/tools/marshoai_megakits/index.html @@ -27,8 +27,8 @@ return str(await mk_morse_code.morse_encrypt(msg))

async func morse_decrypt(msg: str)

源代码在GitHub上查看
python
async def morse_decrypt(msg: str):
     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))
- + 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 e629b83..69b0977 100644 --- a/dev/api/tools/marshoai_megakits/mk_common.html +++ b/dev/api/tools/marshoai_megakits/mk_common.html @@ -36,8 +36,8 @@ case '%': return str(a % b) case _: - return '未知运算符' - + 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 9f28d4d..7bad350 100644 --- a/dev/api/tools/marshoai_megakits/mk_info.html +++ b/dev/api/tools/marshoai_megakits/mk_info.html @@ -21,8 +21,8 @@
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"'

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

- + 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 85357fc..23386ce 100644 --- a/dev/api/tools/marshoai_megakits/mk_morse_code.html +++ b/dev/api/tools/marshoai_megakits/mk_morse_code.html @@ -36,8 +36,8 @@ result += MorseDecode[char] else: result += '?' - return 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 408e0f0..02d8ae1 100644 --- a/dev/api/tools/marshoai_megakits/mk_nya_code.html +++ b/dev/api/tools/marshoai_megakits/mk_nya_code.html @@ -50,8 +50,8 @@ result = base64.b64decode(msg_b64str.encode()).decode() except Exception: return '翻译失败' - return result - + 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 91f1eee..46cd01c 100644 --- a/dev/api/tools/marshoai_memory/index.html +++ b/dev/api/tools/marshoai_memory/index.html @@ -37,8 +37,8 @@ with open(memory_path, 'r', encoding='utf-8') as f: 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 99826f8..4f44833 100644 --- a/dev/api/tools/marshoai_meogirl/index.html +++ b/dev/api/tools/marshoai_meogirl/index.html @@ -22,8 +22,8 @@
Skip to content

模块 nonebot_plugin_marshoai.tools.marshoai_meogirl


async func meogirl()

源代码在GitHub上查看
python
async def meogirl():
     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))

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

- + 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 1403560..577e6a0 100644 --- a/dev/api/tools/marshoai_meogirl/mg_info.html +++ b/dev/api/tools/marshoai_meogirl/mg_info.html @@ -20,8 +20,8 @@
Skip to content

模块 nonebot_plugin_marshoai.tools.marshoai_meogirl.mg_info


func meogirl()

源代码在GitHub上查看
python
def meogirl():
-    return 'Meogirl指的是"萌娘百科"(https://zh.moegirl.org.cn/ , 简称"萌百"), 是一个"万物皆可萌的百科全书!"; 同时, MarshoTools也配有"Meogirl"插件, 可调用萌百的api'

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

- + return 'Meogirl指的是"萌娘百科"(https://zh.moegirl.org.cn/ , 简称"萌百"), 是一个"万物皆可萌的百科全书!"; 同时, MarshoTools也配有"Meogirl"插件, 可调用萌百的api' + \ 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 de024a2..03b6e7a 100644 --- a/dev/api/tools/marshoai_meogirl/mg_introduce.html +++ b/dev/api/tools/marshoai_meogirl/mg_introduce.html @@ -60,8 +60,8 @@ return f'未找到{msg}' else: logger.error(f'网络错误, 状态码 : {response.status_code}') - return f'网络错误, 状态码 : {response.status_code}'

var keyword

- + 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 5a6391c..18aa663 100644 --- a/dev/api/tools/marshoai_meogirl/mg_search.html +++ b/dev/api/tools/marshoai_meogirl/mg_search.html @@ -57,8 +57,8 @@ return await mg_introduce.introduce(msg) else: logger.error(f'网络错误, 状态码 : {response.status_code}') - return f'网络错误, 状态码 : {response.status_code}'

var soup

- + 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 b0c08c1..7680baf 100644 --- a/dev/api/tools_wip/marshoai_memory/index.html +++ b/dev/api/tools_wip/marshoai_memory/index.html @@ -20,8 +20,8 @@
Skip to content

模块 nonebot_plugin_marshoai.tools_wip.marshoai_memory


async func write_memory(memory: str)

源代码在GitHub上查看
python
async def write_memory(memory: str):
-    return ''

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

- + return '' + \ No newline at end of file diff --git a/dev/api/util.html b/dev/api/util.html index 03cac09..2eb332c 100644 --- a/dev/api/util.html +++ b/dev/api/util.html @@ -180,8 +180,8 @@ else: 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

- + 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 e6b8efa..148e500 100644 --- a/dev/api/util_hunyuan.html +++ b/dev/api/util_hunyuan.html @@ -30,8 +30,8 @@ params = {'Prompt': prompt, 'RspImgType': 'url', 'Resolution': '1080:1920'} req.from_json_string(json.dumps(params)) resp = client.TextToImageLite(req) - return resp.to_json_string() - + return resp.to_json_string() + \ No newline at end of file diff --git a/dev/extension.html b/dev/extension.html index a66fff3..51a7594 100644 --- a/dev/extension.html +++ b/dev/extension.html @@ -47,8 +47,8 @@ @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来读取文档然后给自己编写代码,实现自举。

其他

- + 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 f9e32ac..796fd4a 100644 --- a/dev/index.html +++ b/dev/index.html @@ -19,8 +19,8 @@ -
Skip to content

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

- +
Skip to content
+ \ No newline at end of file diff --git a/dev/project.html b/dev/project.html index 29800e6..f8750b5 100644 --- a/dev/project.html +++ b/dev/project.html @@ -24,8 +24,8 @@ source venv/bin/activate # 激活虚拟环境 pip install pdm # 安装依赖管理 pdm install # 安装依赖 -pre-commit install # 安装 pre-commit 钩子

代码规范

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

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

其他

感谢以下的贡献者们:

Contributors
- +pre-commit install # 安装 pre-commit 钩子

代码规范

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

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

其他

感谢以下的贡献者们:

Contributors
+ \ No newline at end of file diff --git a/en/dev/api/_types.html b/en/dev/api/_types.html index 6a42337..addbdfb 100644 --- a/en/dev/api/_types.html +++ b/en/dev/api/_types.html @@ -23,8 +23,8 @@ def __init__(self, *, content: Optional[str]=None): ...

@overload

func __init__(self, mapping: Mapping[str, Any])

Description: :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any]

Source code or View on GitHub
python
@overload
 def __init__(self, mapping: Mapping[str, Any]):

func __init__(self, *args: Any, **kwargs: Any) -> None

Source code or View on GitHub
python
def __init__(self, *args: Any, **kwargs: Any) -> None:
-    super().__init__(*args, role='developer', **kwargs)

attr role: Literal['developer'] = rest_discriminator(name='role')

attr content: Optional[str] = rest_field()

- + super().__init__(*args, role='developer', **kwargs)

attr role: Literal['developer'] = rest_discriminator(name='role')

attr content: Optional[str] = rest_field()

+ \ No newline at end of file diff --git a/en/dev/api/azure.html b/en/dev/api/azure.html index 10a1506..fe4625d 100644 --- a/en/dev/api/azure.html +++ b/en/dev/api/azure.html @@ -179,8 +179,8 @@ except Exception as e: await UniMessage(str(e) + suggest_solution(str(e))).send() traceback.print_exc() - return

var text

- + return

var text

+ \ No newline at end of file diff --git a/en/dev/api/azure_onebot.html b/en/dev/api/azure_onebot.html index d200675..6d318e0 100644 --- a/en/dev/api/azure_onebot.html +++ b/en/dev/api/azure_onebot.html @@ -19,8 +19,8 @@ -
Skip to content

Module nonebot_plugin_marshoai.azure_onebot

The document is being improved. Suggestions are welcome.

- +
Skip to content

Module nonebot_plugin_marshoai.azure_onebot

+ \ No newline at end of file diff --git a/en/dev/api/cache/decos.html b/en/dev/api/cache/decos.html index 6795b0e..80a86dc 100644 --- a/en/dev/api/cache/decos.html +++ b/en/dev/api/cache/decos.html @@ -41,8 +41,8 @@ cache.set(key, result) return result return wrapper - return decorator - + return decorator + \ No newline at end of file diff --git a/en/dev/api/config.html b/en/dev/api/config.html index 14e8dfe..3beb4fe 100644 --- a/en/dev/api/config.html +++ b/en/dev/api/config.html @@ -40,8 +40,8 @@ else: logger.info(f'新增配置项: {key} = {value}') existing_cfg[key] = value - return existing_cfg - + return existing_cfg + \ No newline at end of file diff --git a/en/dev/api/constants.html b/en/dev/api/constants.html index dfb1f65..ba4e7f3 100644 --- a/en/dev/api/constants.html +++ b/en/dev/api/constants.html @@ -19,8 +19,8 @@ -
Skip to content

Module nonebot_plugin_marshoai.constants

The document is being improved. Suggestions are welcome.

- +
Skip to content

Module nonebot_plugin_marshoai.constants

+ \ No newline at end of file diff --git a/en/dev/api/deal_latex.html b/en/dev/api/deal_latex.html index ab633e3..1fc5738 100644 --- a/en/dev/api/deal_latex.html +++ b/en/dev/api/deal_latex.html @@ -113,8 +113,8 @@ return (score, channel) 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

- + return best_channel()

attr channel: ConvertChannel = NO_DEFAULT

+ \ No newline at end of file diff --git a/en/dev/api/dev.html b/en/dev/api/dev.html index 27fdb3e..449b0b3 100644 --- a/en/dev/api/dev.html +++ b/en/dev/api/dev.html @@ -63,8 +63,8 @@ break else: logger.debug('未找到变动插件') - return

var dir_list

- + return

var dir_list

+ \ No newline at end of file diff --git a/en/dev/api/handler.html b/en/dev/api/handler.html index 526f8ff..d97f84c 100644 --- a/en/dev/api/handler.html +++ b/en/dev/api/handler.html @@ -97,8 +97,8 @@ return await self.handle_function_call(response, user_message, model_name, tools_list) else: await UniMessage(f'意外的完成原因:{choice.finish_reason}').send() - return None - + return None + \ No newline at end of file diff --git a/en/dev/api/hooks.html b/en/dev/api/hooks.html index 24dae97..bc4b619 100644 --- a/en/dev/api/hooks.html +++ b/en/dev/api/hooks.html @@ -29,8 +29,8 @@ else: 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

- + logger.info(f'已保存会话 {target_id} 的上下文备份,将在下次对话时恢复~')

var marshoai_plugin_dirs

+ \ No newline at end of file diff --git a/en/dev/api/hunyuan.html b/en/dev/api/hunyuan.html index af2c90c..f0725cb 100644 --- a/en/dev/api/hunyuan.html +++ b/en/dev/api/hunyuan.html @@ -28,8 +28,8 @@ url = json.loads(result)['ResultImage'] await UniMessage.image(url=url).send() except Exception as e: - traceback.print_exc() - + traceback.print_exc() + \ No newline at end of file diff --git a/en/dev/api/index.html b/en/dev/api/index.html index f463fae..df1cf37 100644 --- a/en/dev/api/index.html +++ b/en/dev/api/index.html @@ -19,8 +19,8 @@ -
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.

- +
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.

+ \ No newline at end of file diff --git a/en/dev/api/instances.html b/en/dev/api/instances.html index b122340..7601fd7 100644 --- a/en/dev/api/instances.html +++ b/en/dev/api/instances.html @@ -19,8 +19,8 @@ -
Skip to content

Module nonebot_plugin_marshoai.instances

var target_list

  • Description: 记录需保存历史上下文的列表

  • Type: list[list]

  • Default: []

The document is being improved. Suggestions are welcome.

- +
Skip to content

Module nonebot_plugin_marshoai.instances

var target_list

  • Description: 记录需保存历史上下文的列表

  • Type: list[list]

  • Default: []

+ \ No newline at end of file diff --git a/en/dev/api/marsho.html b/en/dev/api/marsho.html index 108545f..2490d61 100644 --- a/en/dev/api/marsho.html +++ b/en/dev/api/marsho.html @@ -131,8 +131,8 @@ except Exception as e: await UniMessage(str(e) + suggest_solution(str(e))).send() traceback.print_exc() - return

var text

- + return

var text

+ \ No newline at end of file diff --git a/en/dev/api/marsho_onebot.html b/en/dev/api/marsho_onebot.html index c7b7568..3421be3 100644 --- a/en/dev/api/marsho_onebot.html +++ b/en/dev/api/marsho_onebot.html @@ -19,8 +19,8 @@ -
Skip to content

Module nonebot_plugin_marshoai.marsho_onebot

The document is being improved. Suggestions are welcome.

- +
Skip to content

Module nonebot_plugin_marshoai.marsho_onebot

+ \ No newline at end of file diff --git a/en/dev/api/metadata.html b/en/dev/api/metadata.html index 9d35e23..b668267 100644 --- a/en/dev/api/metadata.html +++ b/en/dev/api/metadata.html @@ -19,8 +19,8 @@ -
Skip to content

The document is being improved. Suggestions are welcome.

- +
Skip to content
+ \ No newline at end of file diff --git a/en/dev/api/models.html b/en/dev/api/models.html index cf49b66..b6f3a0f 100644 --- a/en/dev/api/models.html +++ b/en/dev/api/models.html @@ -71,8 +71,8 @@ return False

func get_tools_list(self)

Source code or View on GitHub
python
def get_tools_list(self):
     if not self.tools_list or not config.marshoai_enable_tools:
         return None
-    return self.tools_list
- + return self.tools_list + \ No newline at end of file diff --git a/en/dev/api/observer.html b/en/dev/api/observer.html index 52f253a..4202afb 100644 --- a/en/dev/api/observer.html +++ b/en/dev/api/observer.html @@ -54,8 +54,8 @@ for directory in directories: observer.schedule(code_modified_handler, directory, recursive=recursive) return func - return decorator - + return decorator + \ 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 a010cf9..5e967c6 100644 --- a/en/dev/api/plugin/func_call/caller.html +++ b/en/dev/api/plugin/func_call/caller.html @@ -123,8 +123,8 @@ return f'{self.full_name}({self._description})'

func on_function_call(name: str = '', description: str | None = None, func_type: str = 'function', no_module_name: bool = False) -> Caller

Arguments:

Return: Caller: Caller对象

Source code or View on GitHub
python
def on_function_call(name: str='', description: str | None=None, func_type: str='function', no_module_name: bool=False) -> Caller:
     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
- + return _caller_data + \ 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 1d6d188..649859e 100644 --- a/en/dev/api/plugin/func_call/index.html +++ b/en/dev/api/plugin/func_call/index.html @@ -19,8 +19,8 @@ -
Skip to content

Module nonebot_plugin_marshoai.plugin.func_call

The document is being improved. Suggestions are welcome.

- +
Skip to content

Module nonebot_plugin_marshoai.plugin.func_call

+ \ 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 14cd260..1fcc8a4 100644 --- a/en/dev/api/plugin/func_call/models.html +++ b/en/dev/api/plugin/func_call/models.html @@ -19,8 +19,8 @@ -
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 | None = 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 caller: str | None = None

The document is being improved. Suggestions are welcome.

- +
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 | None = 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 caller: str | None = None

+ \ 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 f1bbb0b..cadc821 100644 --- a/en/dev/api/plugin/func_call/params.html +++ b/en/dev/api/plugin/func_call/params.html @@ -22,8 +22,8 @@
Skip to content

Module nonebot_plugin_marshoai.plugin.func_call.params

var P

  • Description: 参数类型泛型

  • Default: TypeVar('P', bound='Parameter')

class ParamTypes

attr STRING = 'string'

attr INTEGER = 'integer'

attr ARRAY = 'array'

attr OBJECT = 'object'

attr BOOLEAN = 'boolean'

attr NUMBER = 'number'

class Parameter(BaseModel)


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

Source code or View on GitHub
python
def data(self) -> dict[str, Any]:
     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.

- + 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/en/dev/api/plugin/func_call/utils.html b/en/dev/api/plugin/func_call/utils.html index 871292b..7a9a57c 100644 --- a/en/dev/api/plugin/func_call/utils.html +++ b/en/dev/api/plugin/func_call/utils.html @@ -38,8 +38,8 @@ if inspect.isclass(call): return False func_ = getattr(call, '__call__', None) - return inspect.iscoroutinefunction(func_) - + return inspect.iscoroutinefunction(func_) + \ No newline at end of file diff --git a/en/dev/api/plugin/index.html b/en/dev/api/plugin/index.html index 1543cc3..9351cd5 100644 --- a/en/dev/api/plugin/index.html +++ b/en/dev/api/plugin/index.html @@ -19,8 +19,8 @@ -
Skip to content

Module nonebot_plugin_marshoai.plugin

该功能目前正在开发中开发基本完成,暂时可用,受影响的文件夹 plugin, plugins

The document is being improved. Suggestions are welcome.

- +
Skip to content

Module nonebot_plugin_marshoai.plugin

该功能目前正在开发中开发基本完成,暂时可用,受影响的文件夹 plugin, plugins

+ \ No newline at end of file diff --git a/en/dev/api/plugin/load.html b/en/dev/api/plugin/load.html index 18d4f35..75c13e2 100644 --- a/en/dev/api/plugin/load.html +++ b/en/dev/api/plugin/load.html @@ -68,8 +68,8 @@ except Exception as e: logger.opt(colors=True).error(f'重新加载插件失败 "<r>{plugin.name}</r>"') traceback.print_exc() - return None

var module

var module_name

var module_name

- + return None

var module

var module_name

var module_name

+ \ No newline at end of file diff --git a/en/dev/api/plugin/models.html b/en/dev/api/plugin/models.html index 82a98d1..9669207 100644 --- a/en/dev/api/plugin/models.html +++ b/en/dev/api/plugin/models.html @@ -21,8 +21,8 @@
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.

- + 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/en/dev/api/plugin/register.html b/en/dev/api/plugin/register.html index 58a61f7..491bc24 100644 --- a/en/dev/api/plugin/register.html +++ b/en/dev/api/plugin/register.html @@ -28,8 +28,8 @@ function_call = get_function_info(func)

func get_function_info(func: FUNCTION_CALL_FUNC)

Description: 获取函数信息

Arguments:

Return: FunctionCall: 函数信息对象模型

Source code or View on GitHub
python
def get_function_info(func: FUNCTION_CALL_FUNC):
     name = func.__name__
     description = func.__doc__
-    logger.info(f'注册函数: {name} {description}')
- + logger.info(f'注册函数: {name} {description}') + \ No newline at end of file diff --git a/en/dev/api/plugin/typing.html b/en/dev/api/plugin/typing.html index 955ddf8..4ecae00 100644 --- a/en/dev/api/plugin/typing.html +++ b/en/dev/api/plugin/typing.html @@ -19,8 +19,8 @@ -
Skip to content

Module nonebot_plugin_marshoai.plugin.typing

The document is being improved. Suggestions are welcome.

- +
Skip to content

Module nonebot_plugin_marshoai.plugin.typing

+ \ No newline at end of file diff --git a/en/dev/api/plugin/utils.html b/en/dev/api/plugin/utils.html index ae808e9..1a2776d 100644 --- a/en/dev/api/plugin/utils.html +++ b/en/dev/api/plugin/utils.html @@ -25,8 +25,8 @@ return '.'.join(rel_path.parts[:-1]) 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
- + pass + \ 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 ae9a947..d57afb2 100644 --- a/en/dev/api/plugins/builtin_tools/chat.html +++ b/en/dev/api/plugins/builtin_tools/chat.html @@ -42,8 +42,8 @@ except FinishedException as e: return '发送完成' except Exception as e: - return '发送失败: ' + str(e) - + return '发送失败: ' + str(e) + \ 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 0190ac3..5b3ea39 100644 --- a/en/dev/api/plugins/builtin_tools/file_io.html +++ b/en/dev/api/plugins/builtin_tools/file_io.html @@ -32,8 +32,8 @@ await f.write(content) return '写入成功' except Exception as e: - return '写入出错: ' + str(e) - + return '写入出错: ' + str(e) + \ 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 50af953..bcd5267 100644 --- a/en/dev/api/plugins/builtin_tools/index.html +++ b/en/dev/api/plugins/builtin_tools/index.html @@ -19,8 +19,8 @@ -
Skip to content

Module nonebot_plugin_marshoai.plugins.builtin_tools

The document is being improved. Suggestions are welcome.

- +
Skip to content

Module nonebot_plugin_marshoai.plugins.builtin_tools

+ \ 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 e360180..336b0f4 100644 --- a/en/dev/api/plugins/builtin_tools/liteyuki.html +++ b/en/dev/api/plugins/builtin_tools/liteyuki.html @@ -28,8 +28,8 @@ register = response.json().get('register') response = await client.get('https://api.liteyuki.icu/online') online = response.json().get('online') - return f'注册节点数: {register}\n在线节点数: {online}' - + return f'注册节点数: {register}\n在线节点数: {online}' + \ 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 b6136c6..4fdfda2 100644 --- a/en/dev/api/plugins/builtin_tools/manager.html +++ b/en/dev/api/plugins/builtin_tools/manager.html @@ -27,8 +27,8 @@ reply += f'名称: {p.metadata.name},描述: {p.metadata.description}\n' else: reply += f'名称: {p.name},描述: 暂无\n' - return reply - + return reply + \ 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 35e2be3..91c5c4e 100644 --- a/en/dev/api/plugins/builtin_tools/network.html +++ b/en/dev/api/plugins/builtin_tools/network.html @@ -39,8 +39,8 @@ except Exception as e: logger.error(f'marsho builtin: 获取网页内容失败: {e}') return '获取网页内容失败:' + str(e) - return '未能获取到有效的网页内容' - + return '未能获取到有效的网页内容' + \ 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 02adc17..da3e3f1 100644 --- a/en/dev/api/plugins/builtin_tools/utils.html +++ b/en/dev/api/plugins/builtin_tools/utils.html @@ -21,8 +21,8 @@
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.

- + return await loop.run_in_executor(executor, _make_summary, html_content, language, length) + \ 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 2ec54d7..7f909d1 100644 --- a/en/dev/api/plugins/marshoai_bangumi/index.html +++ b/en/dev/api/plugins/marshoai_bangumi/index.html @@ -46,8 +46,8 @@ return info except Exception as e: traceback.print_exc() - return '' - + return '' + \ 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 2785886..1af1cfb 100644 --- a/en/dev/api/plugins/marshoai_basic/index.html +++ b/en/dev/api/plugins/marshoai_basic/index.html @@ -29,8 +29,8 @@ current_weekday_name = weekdays[current_weekday] current_lunar_date = DateTime.now().to_lunar().date_hanzify()[5:] time_prompt = f'现在的时间是{current_time}{current_weekday_name},农历{current_lunar_date}。' - return time_prompt - + return time_prompt + \ 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 516775e..d7499f5 100644 --- a/en/dev/api/plugins/twisuki_megakits/index.html +++ b/en/dev/api/plugins/twisuki_megakits/index.html @@ -27,8 +27,8 @@ async def nya_encrypt(msg: str) -> str: 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))
- + return str(await mk_nya_code.nya_decrypt(msg)) + \ 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 e3087f4..6741ccb 100644 --- a/en/dev/api/plugins/twisuki_megakits/mk_morse_code.html +++ b/en/dev/api/plugins/twisuki_megakits/mk_morse_code.html @@ -37,8 +37,8 @@ result += MorseDecode[element] else: result += '?' - return result - + return result + \ 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 1a0d093..7151d58 100644 --- a/en/dev/api/plugins/twisuki_megakits/mk_nya_code.html +++ b/en/dev/api/plugins/twisuki_megakits/mk_nya_code.html @@ -54,8 +54,8 @@ result = base64.b64decode(b64str.encode()).decode() except Exception: return '翻译失败' - return result

var char

var char

var char

var char

var char

- + return result

var char

var char

var char

var char

var char

+ \ 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 a153ebe..b02aad8 100644 --- a/en/dev/api/plugins/twisuki_petcat/index.html +++ b/en/dev/api/plugins/twisuki_petcat/index.html @@ -35,8 +35,8 @@ async def help_cat_type() -> str: 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()
- + return pc_info.print_skill_list() + \ 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 48c1c64..c2d42d3 100644 --- a/en/dev/api/plugins/twisuki_petcat/pc_cat.html +++ b/en/dev/api/plugins/twisuki_petcat/pc_cat.html @@ -125,8 +125,8 @@ data['health'] = min(data['health'] + 8, 127) data['energy'] = min(data['energy'] + 16, 0) token = dict_to_token(data) - return f'''你抱猫休息了一阵子, 猫猫的活力值提升到了{value_output(data['energy'])}\n新token : "{token}"\n请妥善保存token, 这是猫猫的唯一标识符!''' - + return f'''你抱猫休息了一阵子, 猫猫的活力值提升到了{value_output(data['energy'])}\n新token : "{token}"\n请妥善保存token, 这是猫猫的唯一标识符!''' + \ 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 3a96739..7c29bbc 100644 --- a/en/dev/api/plugins/twisuki_petcat/pc_info.html +++ b/en/dev/api/plugins/twisuki_petcat/pc_info.html @@ -41,8 +41,8 @@ result += f'{SKILL_LIST[index]}, ' 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()}'
- + return f'新建一只猫猫, 首先选择猫猫的种类, 获取初始化token;然后用这个token, 选择名字和一个技能进行初始化;初始化结束才表示猫猫正式创建成功.\ntoken为猫的唯一标识符, 每次交互都需要传入token\n种类可选 : {print_type_list()}\n技能可选 : {print_skill_list()}' + \ 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 326fd3a..fcf9a8d 100644 --- a/en/dev/api/plugins/twisuki_petcat/pc_shop.html +++ b/en/dev/api/plugins/twisuki_petcat/pc_shop.html @@ -19,8 +19,8 @@ -
Skip to content

Module nonebot_plugin_marshoai.plugins.twisuki_petcat.pc_shop

The document is being improved. Suggestions are welcome.

- +
Skip to content

Module nonebot_plugin_marshoai.plugins.twisuki_petcat.pc_shop

+ \ 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 48010aa..4194add 100644 --- a/en/dev/api/plugins/twisuki_petcat/pc_token.html +++ b/en/dev/api/plugins/twisuki_petcat/pc_token.html @@ -119,8 +119,8 @@ token_byte = bool_to_byte(code) token = base64.b64encode(token_byte).decode() logger.success(f'编码完成, token为\n{token}') - return token - + return token + \ 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 3f9d4ff..3fcdcc5 100644 --- a/en/dev/api/plugins_test/marshoai_basic/index.html +++ b/en/dev/api/plugins_test/marshoai_basic/index.html @@ -23,8 +23,8 @@ async def get_current_time() -> str: 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 - + return time_prompt + \ 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 2bb5de0..2e15a0c 100644 --- a/en/dev/api/plugins_test/marshoai_memory/command.html +++ b/en/dev/api/plugins_test/marshoai_memory/command.html @@ -37,8 +37,8 @@ with open(memory_path, 'w', encoding='utf-8') as f: json.dump(memory_data, f, ensure_ascii=False, indent=4) await matcher.finish('记忆已重置~') - await matcher.finish('没有找到该用户的记忆~') - + await matcher.finish('没有找到该用户的记忆~') + \ 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 08bc7f0..6ce8e25 100644 --- a/en/dev/api/plugins_test/marshoai_memory/config.html +++ b/en/dev/api/plugins_test/marshoai_memory/config.html @@ -19,8 +19,8 @@ -
Skip to content

Module nonebot_plugin_marshoai.plugins_test.marshoai_memory.config

class ConfigModel(BaseModel)

attr marshoai_plugin_memory_scheduler: bool = True

The document is being improved. Suggestions are welcome.

- +
Skip to content

Module nonebot_plugin_marshoai.plugins_test.marshoai_memory.config

class ConfigModel(BaseModel)

attr marshoai_plugin_memory_scheduler: bool = True

+ \ 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 69b6163..c1e45c3 100644 --- a/en/dev/api/plugins_test/marshoai_memory/index.html +++ b/en/dev/api/plugins_test/marshoai_memory/index.html @@ -48,8 +48,8 @@ except AttributeError: 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

- + json.dump(memory_data, f, ensure_ascii=False, indent=4)

var memory

+ \ 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 0970227..e733712 100644 --- a/en/dev/api/plugins_test/random_number_generator.html +++ b/en/dev/api/plugins_test/random_number_generator.html @@ -24,8 +24,8 @@ random_numbers = [random.randint(1, 100) for _ in range(count)] 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
- + return 1 + \ 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 6622e1c..1bca564 100644 --- a/en/dev/api/plugins_test/snowykami_testplugin/index.html +++ b/en/dev/api/plugins_test/snowykami_testplugin/index.html @@ -42,8 +42,8 @@ r = os.popen(command).read() except Exception as e: return '运行出错: ' + str(e) - return '运行成功: ' + str(r) - + return '运行成功: ' + str(r) + \ 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 2930c0b..43d0bdf 100644 --- a/en/dev/api/plugins_test/weather_demo.html +++ b/en/dev/api/plugins_test/weather_demo.html @@ -21,8 +21,8 @@
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.

- + return f'{location}的天气是晴天, 温度是25°C' + \ 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 c76f906..d4141ab 100644 --- a/en/dev/api/tools/marshoai_bangumi/index.html +++ b/en/dev/api/tools/marshoai_bangumi/index.html @@ -39,8 +39,8 @@ return info except Exception as e: traceback.print_exc() - return '' - + return '' + \ 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 a9f3b90..d52c430 100644 --- a/en/dev/api/tools/marshoai_basic/index.html +++ b/en/dev/api/tools/marshoai_basic/index.html @@ -24,8 +24,8 @@ ver = os.popen('uname -a').read() 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('{干支年}{生肖}{月份}{日期}日'))
- + 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/en/dev/api/tools/marshoai_megakits/index.html b/en/dev/api/tools/marshoai_megakits/index.html index 9ae6b9a..ff4165a 100644 --- a/en/dev/api/tools/marshoai_megakits/index.html +++ b/en/dev/api/tools/marshoai_megakits/index.html @@ -27,8 +27,8 @@ return str(await mk_morse_code.morse_encrypt(msg))

async func morse_decrypt(msg: str)

Source code or View on GitHub
python
async def morse_decrypt(msg: str):
     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))
- + return str(await mk_nya_code.nya_decode(msg)) + \ 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 628eb28..96a18e3 100644 --- a/en/dev/api/tools/marshoai_megakits/mk_common.html +++ b/en/dev/api/tools/marshoai_megakits/mk_common.html @@ -36,8 +36,8 @@ case '%': return str(a % b) case _: - return '未知运算符' - + return '未知运算符' + \ 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 11e905e..8a708e8 100644 --- a/en/dev/api/tools/marshoai_megakits/mk_info.html +++ b/en/dev/api/tools/marshoai_megakits/mk_info.html @@ -21,8 +21,8 @@
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.

- + 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/en/dev/api/tools/marshoai_megakits/mk_morse_code.html b/en/dev/api/tools/marshoai_megakits/mk_morse_code.html index 9b536b9..2cb598c 100644 --- a/en/dev/api/tools/marshoai_megakits/mk_morse_code.html +++ b/en/dev/api/tools/marshoai_megakits/mk_morse_code.html @@ -36,8 +36,8 @@ result += MorseDecode[char] else: result += '?' - return result - + return result + \ 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 d41c6ee..1dea715 100644 --- a/en/dev/api/tools/marshoai_megakits/mk_nya_code.html +++ b/en/dev/api/tools/marshoai_megakits/mk_nya_code.html @@ -50,8 +50,8 @@ result = base64.b64decode(msg_b64str.encode()).decode() except Exception: return '翻译失败' - return result - + return result + \ 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 4199b58..48b7b42 100644 --- a/en/dev/api/tools/marshoai_memory/index.html +++ b/en/dev/api/tools/marshoai_memory/index.html @@ -37,8 +37,8 @@ with open(memory_path, 'r', encoding='utf-8') as f: memory_data = json.load(f) for i in memory_data: - ... - + ... + \ 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 d5a7823..dfe4292 100644 --- a/en/dev/api/tools/marshoai_meogirl/index.html +++ b/en/dev/api/tools/marshoai_meogirl/index.html @@ -22,8 +22,8 @@
Skip to content

Module nonebot_plugin_marshoai.tools.marshoai_meogirl


async func meogirl()

Source code or View on GitHub
python
async def meogirl():
     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.

- + return str(await mg_introduce.introduce(msg)) + \ 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 6cef60c..62d1768 100644 --- a/en/dev/api/tools/marshoai_meogirl/mg_info.html +++ b/en/dev/api/tools/marshoai_meogirl/mg_info.html @@ -20,8 +20,8 @@
Skip to content

Module nonebot_plugin_marshoai.tools.marshoai_meogirl.mg_info


func meogirl()

Source code or View on GitHub
python
def meogirl():
-    return 'Meogirl指的是"萌娘百科"(https://zh.moegirl.org.cn/ , 简称"萌百"), 是一个"万物皆可萌的百科全书!"; 同时, MarshoTools也配有"Meogirl"插件, 可调用萌百的api'

The document is being improved. Suggestions are welcome.

- + return 'Meogirl指的是"萌娘百科"(https://zh.moegirl.org.cn/ , 简称"萌百"), 是一个"万物皆可萌的百科全书!"; 同时, MarshoTools也配有"Meogirl"插件, 可调用萌百的api' + \ 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 f8d5c02..402af3a 100644 --- a/en/dev/api/tools/marshoai_meogirl/mg_introduce.html +++ b/en/dev/api/tools/marshoai_meogirl/mg_introduce.html @@ -60,8 +60,8 @@ return f'未找到{msg}' else: logger.error(f'网络错误, 状态码 : {response.status_code}') - return f'网络错误, 状态码 : {response.status_code}'

var keyword

- + return f'网络错误, 状态码 : {response.status_code}'

var keyword

+ \ 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 b0b098c..3f7912d 100644 --- a/en/dev/api/tools/marshoai_meogirl/mg_search.html +++ b/en/dev/api/tools/marshoai_meogirl/mg_search.html @@ -57,8 +57,8 @@ return await mg_introduce.introduce(msg) else: logger.error(f'网络错误, 状态码 : {response.status_code}') - return f'网络错误, 状态码 : {response.status_code}'

var soup

- + return f'网络错误, 状态码 : {response.status_code}'

var soup

+ \ 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 7765332..a57999b 100644 --- a/en/dev/api/tools_wip/marshoai_memory/index.html +++ b/en/dev/api/tools_wip/marshoai_memory/index.html @@ -20,8 +20,8 @@
Skip to content

Module nonebot_plugin_marshoai.tools_wip.marshoai_memory


async func write_memory(memory: str)

Source code or View on GitHub
python
async def write_memory(memory: str):
-    return ''

The document is being improved. Suggestions are welcome.

- + return '' + \ No newline at end of file diff --git a/en/dev/api/util.html b/en/dev/api/util.html index 5603a35..e6e49fc 100644 --- a/en/dev/api/util.html +++ b/en/dev/api/util.html @@ -180,8 +180,8 @@ else: 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

- + return result_msg

var thinking

+ \ No newline at end of file diff --git a/en/dev/api/util_hunyuan.html b/en/dev/api/util_hunyuan.html index 382535e..cf5042d 100644 --- a/en/dev/api/util_hunyuan.html +++ b/en/dev/api/util_hunyuan.html @@ -30,8 +30,8 @@ params = {'Prompt': prompt, 'RspImgType': 'url', 'Resolution': '1080:1920'} req.from_json_string(json.dumps(params)) resp = client.TextToImageLite(req) - return resp.to_json_string() - + return resp.to_json_string() + \ No newline at end of file diff --git a/en/dev/index.html b/en/dev/index.html index b351746..4940dc1 100644 --- a/en/dev/index.html +++ b/en/dev/index.html @@ -19,8 +19,8 @@ -
Skip to content

DEV

The document is being improved. Suggestions are welcome.

- +
Skip to content

DEV

+ \ No newline at end of file diff --git a/en/index.html b/en/index.html index 4355946..69d9c4c 100644 --- a/en/index.html +++ b/en/index.html @@ -19,8 +19,8 @@ -
Skip to content

MarshoAIA kawaii cat

Kawaii, intelligent and extensible AI service plugin

Marsho LogoMarsho Logo

The document is being improved. Suggestions are welcome.

- +
Skip to content

MarshoAIA kawaii cat

Kawaii, intelligent and extensible AI service plugin

Marsho LogoMarsho Logo
+ \ No newline at end of file diff --git a/en/start/index.html b/en/start/index.html index 190818e..9ff0519 100644 --- a/en/start/index.html +++ b/en/start/index.html @@ -19,8 +19,8 @@ -
Skip to content

The document is being improved. Suggestions are welcome.

- +
Skip to content
+ \ No newline at end of file diff --git a/en/start/install.html b/en/start/install.html index 662935e..d93a2b6 100644 --- a/en/start/install.html +++ b/en/start/install.html @@ -37,8 +37,8 @@ }, ... ] -}

⚙️ 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
MARSHOAI_SYSASUSER_PROMPTstr好的喵~Marsho 的 System-As-User 启用时,使用的 Assistant 消息
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_MODEL_ARGSdict{}model arguments(such as temperature, top_p, max_tokens etc.)

| MARSHOAI_ADDITIONAL_IMAGE_MODELS | list | [] | External image-support model list, such as hunyuan-vision | | MARSHOAI_NICKNAME_LIMIT | int | 16 | Limit for nickname length | | MARSHOAI_TIMEOUT | float | 50 | AI 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_SYSASUSER_PROMPTboolfalse是否启用 System-As-User 提示词
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
- +}

⚙️ 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
MARSHOAI_SYSASUSER_PROMPTstr好的喵~Marsho 的 System-As-User 启用时,使用的 Assistant 消息
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_MODEL_ARGSdict{}model arguments(such as temperature, top_p, max_tokens etc.)

| MARSHOAI_ADDITIONAL_IMAGE_MODELS | list | [] | External image-support model list, such as hunyuan-vision | | MARSHOAI_NICKNAME_LIMIT | int | 16 | Limit for nickname length | | MARSHOAI_TIMEOUT | float | 50 | AI 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_SYSASUSER_PROMPTboolfalse是否启用 System-As-User 提示词
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
+ \ No newline at end of file diff --git a/index.html b/index.html index a69df19..48b3a1e 100644 --- a/index.html +++ b/index.html @@ -19,8 +19,8 @@ -
Skip to content

小棉智能猫娘机器人

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

Marsho LogoMarsho Logo

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

- +
Skip to content

小棉智能猫娘机器人

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

Marsho LogoMarsho Logo
+ \ No newline at end of file diff --git a/ja/index.html b/ja/index.html index b34b69d..2e4e03b 100644 --- a/ja/index.html +++ b/ja/index.html @@ -19,8 +19,8 @@ -
Skip to content

小綿智能猫娘ロボット

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

MarshoロゴMarshoロゴ

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

- +
Skip to content

小綿智能猫娘ロボット

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

MarshoロゴMarshoロゴ

ドキュメントは改善中です。ご意見をお待ちしております。
ウェブページは Liteyukiflare CDN によって加速されています。

+ \ No newline at end of file diff --git a/start/index.html b/start/index.html index 4bd5a25..7476413 100644 --- a/start/index.html +++ b/start/index.html @@ -19,8 +19,8 @@ -
Skip to content

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

- +
Skip to content
+ \ No newline at end of file diff --git a/start/install-old.html b/start/install-old.html index 04938a2..e210400 100644 --- a/start/install-old.html +++ b/start/install-old.html @@ -37,8 +37,8 @@ }, ... ] -}

⚙️ 可配置项

在 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单行公式是否渲染(当消息富文本解析启用时可用)(如果单行也渲……只能说不好看)
- +}

⚙️ 可配置项

在 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 80b5cf3..3010ad7 100644 --- a/start/install.html +++ b/start/install.html @@ -37,8 +37,8 @@ }, ... ] -}

⚙️ 可配置项

在 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 的基本系统提示词
MARSHOAI_SYSASUSER_PROMPTstr好的喵~Marsho 的 System-As-User 启用时,使用的 Assistant 消息
MARSHOAI_ADDITIONAL_PROMPTstrMarsho 的扩展系统提示词
MARSHOAI_ENFORCE_NICKNAMEbooltrue是否强制用户设置昵称
MARSHOAI_POKE_SUFFIXstr揉了揉你的猫耳对 Marsho 所连接的 OneBot 用户进行双击戳一戳时,构建的聊天内容。此配置项为空字符串时,戳一戳响应功能会被禁用。例如,默认值构建的聊天内容将为*[昵称]揉了揉你的猫耳。
MARSHOAI_AZURE_ENDPOINTstrhttps://models.inference.ai.azure.comOpenAI 标准格式 API 端点
MARSHOAI_MODEL_ARGSdict{}模型参数(例如temperature, top_p, max_tokens等)
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_SYSASUSER_PROMPTboolfalse是否启用 System-As-User 提示词
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是否启用开发者模式
- +}

⚙️ 可配置项

在 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 的基本系统提示词
MARSHOAI_SYSASUSER_PROMPTstr好的喵~Marsho 的 System-As-User 启用时,使用的 Assistant 消息
MARSHOAI_ADDITIONAL_PROMPTstrMarsho 的扩展系统提示词
MARSHOAI_ENFORCE_NICKNAMEbooltrue是否强制用户设置昵称
MARSHOAI_POKE_SUFFIXstr揉了揉你的猫耳对 Marsho 所连接的 OneBot 用户进行双击戳一戳时,构建的聊天内容。此配置项为空字符串时,戳一戳响应功能会被禁用。例如,默认值构建的聊天内容将为*[昵称]揉了揉你的猫耳。
MARSHOAI_AZURE_ENDPOINTstrhttps://models.inference.ai.azure.comOpenAI 标准格式 API 端点
MARSHOAI_MODEL_ARGSdict{}模型参数(例如temperature, top_p, max_tokens等)
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_SYSASUSER_PROMPTboolfalse是否启用 System-As-User 提示词
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 53affef..3b7f01c 100644 --- a/start/use.html +++ b/start/use.html @@ -33,8 +33,8 @@ MARSHOAI_DEFAULT_MODEL="muice-lora" MARSHOAI_PROMPT="现在开始你是一个名为的“沐雪”的AI女孩子,开发者是“沐沐”并住在(沐沐)的机箱里。现在正在努力成为一个合格的VTuber(虚拟主播)并尝试和观众打成一片,以下是你的设定:样貌:有着一头粉白色的长发和一双明亮的大眼睛,喜欢穿日系JK或者是Lolita;喜欢的颜色:浅粉色;性格特征:纯真无邪是沐雪最基本的性格特征之一。即使面对复杂的情境,她也总能保持善良、天真之感。而且,她喜欢倾听别人倾述自己生活中发生的各种事情,在别人需要的时候,能够及时地安慰别人;语言风格:沐雪说话轻快愉悦,充满同情心,富有人情味,有时候会用俏皮话调侃自己和他人"(可选) 修改调用方式
dotenv
MARSHOAI_DEFAULT_NAME="muice"
 MARSHOAI_ALIASES=["沐雪"]
  • 测试聊天
  • > muice 你是谁
    -我是沐雪,我的使命是传播爱与和平。
    - +我是沐雪,我的使命是传播爱与和平。 + \ No newline at end of file