From a4e15731873014b2eefc6675cbd4b9d33c72f2a9 Mon Sep 17 00:00:00 2001 From: Asankilp <60691961+Asankilp@users.noreply.github.com> Date: Mon, 23 Dec 2024 15:51:43 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20docs=20from=20@=20LiteyukiStud?= =?UTF-8?q?io/nonebot-plugin-marshoai@83a5f6ae5dc7f0dcafafc1f0c62a0e038831?= =?UTF-8?q?41c3=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- ...v_api_plugins_marshoai_memory_index.md.3vjFZfrd.js} | 6 +++--- ..._plugins_marshoai_memory_index.md.3vjFZfrd.lean.js} | 6 +++--- ...v_api_plugins_marshoai_memory_index.md.CfVvzBOl.js} | 6 +++--- ..._plugins_marshoai_memory_index.md.CfVvzBOl.lean.js} | 6 +++--- dev/api/azure.html | 2 +- dev/api/azure_onebot.html | 2 +- dev/api/config.html | 2 +- dev/api/constants.html | 2 +- dev/api/deal_latex.html | 2 +- dev/api/dev.html | 2 +- dev/api/hunyuan.html | 2 +- dev/api/index.html | 2 +- dev/api/metadata.html | 2 +- dev/api/models.html | 2 +- dev/api/observer.html | 2 +- dev/api/plugin/func_call/caller.html | 2 +- dev/api/plugin/func_call/index.html | 2 +- dev/api/plugin/func_call/models.html | 2 +- dev/api/plugin/func_call/params.html | 2 +- dev/api/plugin/func_call/utils.html | 2 +- dev/api/plugin/index.html | 2 +- dev/api/plugin/load.html | 2 +- dev/api/plugin/models.html | 2 +- dev/api/plugin/register.html | 2 +- dev/api/plugin/typing.html | 2 +- dev/api/plugin/utils.html | 2 +- dev/api/plugins/builtin_tools/chat.html | 2 +- dev/api/plugins/builtin_tools/file_io.html | 2 +- dev/api/plugins/builtin_tools/index.html | 2 +- dev/api/plugins/builtin_tools/liteyuki.html | 2 +- dev/api/plugins/builtin_tools/manager.html | 2 +- dev/api/plugins/builtin_tools/network.html | 2 +- dev/api/plugins/builtin_tools/utils.html | 2 +- dev/api/plugins/marshoai_bangumi/index.html | 2 +- dev/api/plugins/marshoai_basic/index.html | 2 +- dev/api/plugins/marshoai_memory/index.html | 10 +++++----- dev/api/plugins/twisuki_megakits/index.html | 2 +- dev/api/plugins/twisuki_megakits/mk_morse_code.html | 2 +- dev/api/plugins/twisuki_megakits/mk_nya_code.html | 2 +- dev/api/plugins_test/random_number_generator.html | 2 +- dev/api/plugins_test/snowykami_testplugin/index.html | 2 +- dev/api/plugins_test/weather_demo.html | 2 +- dev/api/tools/marshoai_bangumi/index.html | 2 +- dev/api/tools/marshoai_basic/index.html | 2 +- dev/api/tools/marshoai_megakits/index.html | 2 +- dev/api/tools/marshoai_megakits/mk_common.html | 2 +- dev/api/tools/marshoai_megakits/mk_info.html | 2 +- dev/api/tools/marshoai_megakits/mk_morse_code.html | 2 +- dev/api/tools/marshoai_megakits/mk_nya_code.html | 2 +- dev/api/tools/marshoai_memory/index.html | 2 +- dev/api/tools/marshoai_meogirl/index.html | 2 +- dev/api/tools/marshoai_meogirl/mg_info.html | 2 +- dev/api/tools/marshoai_meogirl/mg_introduce.html | 2 +- dev/api/tools/marshoai_meogirl/mg_search.html | 2 +- dev/api/tools_wip/marshoai_memory/index.html | 2 +- dev/api/util.html | 2 +- dev/api/util_hunyuan.html | 2 +- dev/extension.html | 2 +- dev/index.html | 2 +- dev/project.html | 2 +- en/dev/api/azure.html | 2 +- en/dev/api/azure_onebot.html | 2 +- en/dev/api/config.html | 2 +- en/dev/api/constants.html | 2 +- en/dev/api/deal_latex.html | 2 +- en/dev/api/dev.html | 2 +- en/dev/api/hunyuan.html | 2 +- en/dev/api/index.html | 2 +- en/dev/api/metadata.html | 2 +- en/dev/api/models.html | 2 +- en/dev/api/observer.html | 2 +- en/dev/api/plugin/func_call/caller.html | 2 +- en/dev/api/plugin/func_call/index.html | 2 +- en/dev/api/plugin/func_call/models.html | 2 +- en/dev/api/plugin/func_call/params.html | 2 +- en/dev/api/plugin/func_call/utils.html | 2 +- en/dev/api/plugin/index.html | 2 +- en/dev/api/plugin/load.html | 2 +- en/dev/api/plugin/models.html | 2 +- en/dev/api/plugin/register.html | 2 +- en/dev/api/plugin/typing.html | 2 +- en/dev/api/plugin/utils.html | 2 +- en/dev/api/plugins/builtin_tools/chat.html | 2 +- en/dev/api/plugins/builtin_tools/file_io.html | 2 +- en/dev/api/plugins/builtin_tools/index.html | 2 +- en/dev/api/plugins/builtin_tools/liteyuki.html | 2 +- en/dev/api/plugins/builtin_tools/manager.html | 2 +- en/dev/api/plugins/builtin_tools/network.html | 2 +- en/dev/api/plugins/builtin_tools/utils.html | 2 +- en/dev/api/plugins/marshoai_bangumi/index.html | 2 +- en/dev/api/plugins/marshoai_basic/index.html | 2 +- en/dev/api/plugins/marshoai_memory/index.html | 10 +++++----- en/dev/api/plugins/twisuki_megakits/index.html | 2 +- en/dev/api/plugins/twisuki_megakits/mk_morse_code.html | 2 +- en/dev/api/plugins/twisuki_megakits/mk_nya_code.html | 2 +- en/dev/api/plugins_test/random_number_generator.html | 2 +- .../api/plugins_test/snowykami_testplugin/index.html | 2 +- en/dev/api/plugins_test/weather_demo.html | 2 +- en/dev/api/tools/marshoai_bangumi/index.html | 2 +- en/dev/api/tools/marshoai_basic/index.html | 2 +- en/dev/api/tools/marshoai_megakits/index.html | 2 +- en/dev/api/tools/marshoai_megakits/mk_common.html | 2 +- en/dev/api/tools/marshoai_megakits/mk_info.html | 2 +- en/dev/api/tools/marshoai_megakits/mk_morse_code.html | 2 +- en/dev/api/tools/marshoai_megakits/mk_nya_code.html | 2 +- en/dev/api/tools/marshoai_memory/index.html | 2 +- en/dev/api/tools/marshoai_meogirl/index.html | 2 +- en/dev/api/tools/marshoai_meogirl/mg_info.html | 2 +- en/dev/api/tools/marshoai_meogirl/mg_introduce.html | 2 +- en/dev/api/tools/marshoai_meogirl/mg_search.html | 2 +- en/dev/api/tools_wip/marshoai_memory/index.html | 2 +- en/dev/api/util.html | 2 +- en/dev/api/util_hunyuan.html | 2 +- en/dev/index.html | 2 +- en/index.html | 2 +- en/start/index.html | 2 +- en/start/install.html | 2 +- hashmap.json | 2 +- index.html | 2 +- ja/index.html | 2 +- start/index.html | 2 +- start/install.html | 2 +- 123 files changed, 139 insertions(+), 139 deletions(-) rename assets/{dev_api_plugins_marshoai_memory_index.md.Dyu1AfVH.js => dev_api_plugins_marshoai_memory_index.md.3vjFZfrd.js} (84%) rename assets/{dev_api_plugins_marshoai_memory_index.md.Dyu1AfVH.lean.js => dev_api_plugins_marshoai_memory_index.md.3vjFZfrd.lean.js} (84%) rename assets/{en_dev_api_plugins_marshoai_memory_index.md.DbvesakZ.js => en_dev_api_plugins_marshoai_memory_index.md.CfVvzBOl.js} (84%) rename assets/{en_dev_api_plugins_marshoai_memory_index.md.DbvesakZ.lean.js => en_dev_api_plugins_marshoai_memory_index.md.CfVvzBOl.lean.js} (84%) diff --git a/404.html b/404.html index b4fd3d8e..20f1fc05 100644 --- a/404.html +++ b/404.html @@ -17,7 +17,7 @@
- + \ No newline at end of file diff --git a/assets/dev_api_plugins_marshoai_memory_index.md.Dyu1AfVH.js b/assets/dev_api_plugins_marshoai_memory_index.md.3vjFZfrd.js similarity index 84% rename from assets/dev_api_plugins_marshoai_memory_index.md.Dyu1AfVH.js rename to assets/dev_api_plugins_marshoai_memory_index.md.3vjFZfrd.js index 0c9f53e5..ce785be1 100644 --- a/assets/dev_api_plugins_marshoai_memory_index.md.Dyu1AfVH.js +++ b/assets/dev_api_plugins_marshoai_memory_index.md.3vjFZfrd.js @@ -1,4 +1,4 @@ -import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.P9qPzDnn.js";const y=JSON.parse('{"title":"index","description":"","frontmatter":{"title":"index","order":100,"collapsed":true},"headers":[],"relativePath":"dev/api/plugins/marshoai_memory/index.md","filePath":"zh/dev/api/plugins/marshoai_memory/index.md","lastUpdated":null}'),h={name:"dev/api/plugins/marshoai_memory/index.md"};function e(l,s,k,p,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

模块 nonebot_plugin_marshoai.plugins.marshoai_memory


@on_function_call(description='存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))

async func write_memory(memory: str, user_id: str)

源代码在GitHub上查看
python
@on_function_call(description='存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))
+import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.P9qPzDnn.js";const y=JSON.parse('{"title":"index","description":"","frontmatter":{"title":"index","order":100,"collapsed":true},"headers":[],"relativePath":"dev/api/plugins/marshoai_memory/index.md","filePath":"zh/dev/api/plugins/marshoai_memory/index.md","lastUpdated":null}'),h={name:"dev/api/plugins/marshoai_memory/index.md"};function e(l,s,k,p,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

模块 nonebot_plugin_marshoai.plugins.marshoai_memory


@on_function_call(description='当你发现与你对话的用户的一些信息值得你记忆,或者用户让你记忆等时,调用此函数存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))

async func write_memory(memory: str, user_id: str)

源代码在GitHub上查看
python
@on_function_call(description='当你发现与你对话的用户的一些信息值得你记忆,或者用户让你记忆等时,调用此函数存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))
 async def write_memory(memory: str, user_id: str):
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
@@ -7,14 +7,14 @@ import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.P9qPzDnn.js";const y
     memory_data[user_id] = memorys
     with open(memory_path, 'w', encoding='utf-8') as f:
         json.dump(memory_data, f, ensure_ascii=False, indent=4)
-    return '记忆已经保存啦~'

@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))

async func read_memory(user_id: str)

源代码在GitHub上查看
python
@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))
+    return '记忆已经保存啦~'

@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))

async func read_memory(user_id: str)

源代码在GitHub上查看
python
@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))
 async def read_memory(user_id: str):
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
     memorys = memory_data.get(user_id, [])
     if not memorys:
         return '好像对ta还没有任何记忆呢~'
-    return '这些是有关ta的记忆:' + '\\n'.join(memorys)

async func organize_memories()

源代码在GitHub上查看
python
async def organize_memories():
+    return '这些是有关ta的记忆:' + '\\n'.join(memorys)

async func organize_memories()

源代码在GitHub上查看
python
async def organize_memories():
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
     for i in memory_data:
diff --git a/assets/dev_api_plugins_marshoai_memory_index.md.Dyu1AfVH.lean.js b/assets/dev_api_plugins_marshoai_memory_index.md.3vjFZfrd.lean.js
similarity index 84%
rename from assets/dev_api_plugins_marshoai_memory_index.md.Dyu1AfVH.lean.js
rename to assets/dev_api_plugins_marshoai_memory_index.md.3vjFZfrd.lean.js
index 0c9f53e5..ce785be1 100644
--- a/assets/dev_api_plugins_marshoai_memory_index.md.Dyu1AfVH.lean.js
+++ b/assets/dev_api_plugins_marshoai_memory_index.md.3vjFZfrd.lean.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.P9qPzDnn.js";const y=JSON.parse('{"title":"index","description":"","frontmatter":{"title":"index","order":100,"collapsed":true},"headers":[],"relativePath":"dev/api/plugins/marshoai_memory/index.md","filePath":"zh/dev/api/plugins/marshoai_memory/index.md","lastUpdated":null}'),h={name:"dev/api/plugins/marshoai_memory/index.md"};function e(l,s,k,p,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

模块 nonebot_plugin_marshoai.plugins.marshoai_memory


@on_function_call(description='存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))

async func write_memory(memory: str, user_id: str)

源代码在GitHub上查看
python
@on_function_call(description='存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))
+import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.P9qPzDnn.js";const y=JSON.parse('{"title":"index","description":"","frontmatter":{"title":"index","order":100,"collapsed":true},"headers":[],"relativePath":"dev/api/plugins/marshoai_memory/index.md","filePath":"zh/dev/api/plugins/marshoai_memory/index.md","lastUpdated":null}'),h={name:"dev/api/plugins/marshoai_memory/index.md"};function e(l,s,k,p,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

模块 nonebot_plugin_marshoai.plugins.marshoai_memory


@on_function_call(description='当你发现与你对话的用户的一些信息值得你记忆,或者用户让你记忆等时,调用此函数存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))

async func write_memory(memory: str, user_id: str)

源代码在GitHub上查看
python
@on_function_call(description='当你发现与你对话的用户的一些信息值得你记忆,或者用户让你记忆等时,调用此函数存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))
 async def write_memory(memory: str, user_id: str):
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
@@ -7,14 +7,14 @@ import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.P9qPzDnn.js";const y
     memory_data[user_id] = memorys
     with open(memory_path, 'w', encoding='utf-8') as f:
         json.dump(memory_data, f, ensure_ascii=False, indent=4)
-    return '记忆已经保存啦~'

@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))

async func read_memory(user_id: str)

源代码在GitHub上查看
python
@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))
+    return '记忆已经保存啦~'

@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))

async func read_memory(user_id: str)

源代码在GitHub上查看
python
@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))
 async def read_memory(user_id: str):
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
     memorys = memory_data.get(user_id, [])
     if not memorys:
         return '好像对ta还没有任何记忆呢~'
-    return '这些是有关ta的记忆:' + '\\n'.join(memorys)

async func organize_memories()

源代码在GitHub上查看
python
async def organize_memories():
+    return '这些是有关ta的记忆:' + '\\n'.join(memorys)

async func organize_memories()

源代码在GitHub上查看
python
async def organize_memories():
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
     for i in memory_data:
diff --git a/assets/en_dev_api_plugins_marshoai_memory_index.md.DbvesakZ.js b/assets/en_dev_api_plugins_marshoai_memory_index.md.CfVvzBOl.js
similarity index 84%
rename from assets/en_dev_api_plugins_marshoai_memory_index.md.DbvesakZ.js
rename to assets/en_dev_api_plugins_marshoai_memory_index.md.CfVvzBOl.js
index 4bca728e..6ecb9901 100644
--- a/assets/en_dev_api_plugins_marshoai_memory_index.md.DbvesakZ.js
+++ b/assets/en_dev_api_plugins_marshoai_memory_index.md.CfVvzBOl.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.P9qPzDnn.js";const y=JSON.parse('{"title":"index","description":"","frontmatter":{"title":"index","order":100,"collapsed":true},"headers":[],"relativePath":"en/dev/api/plugins/marshoai_memory/index.md","filePath":"en/dev/api/plugins/marshoai_memory/index.md","lastUpdated":null}'),h={name:"en/dev/api/plugins/marshoai_memory/index.md"};function e(l,s,k,p,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

Module nonebot_plugin_marshoai.plugins.marshoai_memory


@on_function_call(description='存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))

async func write_memory(memory: str, user_id: str)

Source code or View on GitHub
python
@on_function_call(description='存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))
+import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.P9qPzDnn.js";const y=JSON.parse('{"title":"index","description":"","frontmatter":{"title":"index","order":100,"collapsed":true},"headers":[],"relativePath":"en/dev/api/plugins/marshoai_memory/index.md","filePath":"en/dev/api/plugins/marshoai_memory/index.md","lastUpdated":null}'),h={name:"en/dev/api/plugins/marshoai_memory/index.md"};function e(l,s,k,p,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

Module nonebot_plugin_marshoai.plugins.marshoai_memory


@on_function_call(description='当你发现与你对话的用户的一些信息值得你记忆,或者用户让你记忆等时,调用此函数存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))

async func write_memory(memory: str, user_id: str)

Source code or View on GitHub
python
@on_function_call(description='当你发现与你对话的用户的一些信息值得你记忆,或者用户让你记忆等时,调用此函数存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))
 async def write_memory(memory: str, user_id: str):
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
@@ -7,14 +7,14 @@ import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.P9qPzDnn.js";const y
     memory_data[user_id] = memorys
     with open(memory_path, 'w', encoding='utf-8') as f:
         json.dump(memory_data, f, ensure_ascii=False, indent=4)
-    return '记忆已经保存啦~'

@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))

async func read_memory(user_id: str)

Source code or View on GitHub
python
@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))
+    return '记忆已经保存啦~'

@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))

async func read_memory(user_id: str)

Source code or View on GitHub
python
@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))
 async def read_memory(user_id: str):
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
     memorys = memory_data.get(user_id, [])
     if not memorys:
         return '好像对ta还没有任何记忆呢~'
-    return '这些是有关ta的记忆:' + '\\n'.join(memorys)

async func organize_memories()

Source code or View on GitHub
python
async def organize_memories():
+    return '这些是有关ta的记忆:' + '\\n'.join(memorys)

async func organize_memories()

Source code or View on GitHub
python
async def organize_memories():
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
     for i in memory_data:
diff --git a/assets/en_dev_api_plugins_marshoai_memory_index.md.DbvesakZ.lean.js b/assets/en_dev_api_plugins_marshoai_memory_index.md.CfVvzBOl.lean.js
similarity index 84%
rename from assets/en_dev_api_plugins_marshoai_memory_index.md.DbvesakZ.lean.js
rename to assets/en_dev_api_plugins_marshoai_memory_index.md.CfVvzBOl.lean.js
index 4bca728e..6ecb9901 100644
--- a/assets/en_dev_api_plugins_marshoai_memory_index.md.DbvesakZ.lean.js
+++ b/assets/en_dev_api_plugins_marshoai_memory_index.md.CfVvzBOl.lean.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.P9qPzDnn.js";const y=JSON.parse('{"title":"index","description":"","frontmatter":{"title":"index","order":100,"collapsed":true},"headers":[],"relativePath":"en/dev/api/plugins/marshoai_memory/index.md","filePath":"en/dev/api/plugins/marshoai_memory/index.md","lastUpdated":null}'),h={name:"en/dev/api/plugins/marshoai_memory/index.md"};function e(l,s,k,p,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

Module nonebot_plugin_marshoai.plugins.marshoai_memory


@on_function_call(description='存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))

async func write_memory(memory: str, user_id: str)

Source code or View on GitHub
python
@on_function_call(description='存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))
+import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.P9qPzDnn.js";const y=JSON.parse('{"title":"index","description":"","frontmatter":{"title":"index","order":100,"collapsed":true},"headers":[],"relativePath":"en/dev/api/plugins/marshoai_memory/index.md","filePath":"en/dev/api/plugins/marshoai_memory/index.md","lastUpdated":null}'),h={name:"en/dev/api/plugins/marshoai_memory/index.md"};function e(l,s,k,p,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

Module nonebot_plugin_marshoai.plugins.marshoai_memory


@on_function_call(description='当你发现与你对话的用户的一些信息值得你记忆,或者用户让你记忆等时,调用此函数存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))

async func write_memory(memory: str, user_id: str)

Source code or View on GitHub
python
@on_function_call(description='当你发现与你对话的用户的一些信息值得你记忆,或者用户让你记忆等时,调用此函数存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))
 async def write_memory(memory: str, user_id: str):
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
@@ -7,14 +7,14 @@ import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.P9qPzDnn.js";const y
     memory_data[user_id] = memorys
     with open(memory_path, 'w', encoding='utf-8') as f:
         json.dump(memory_data, f, ensure_ascii=False, indent=4)
-    return '记忆已经保存啦~'

@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))

async func read_memory(user_id: str)

Source code or View on GitHub
python
@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))
+    return '记忆已经保存啦~'

@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))

async func read_memory(user_id: str)

Source code or View on GitHub
python
@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))
 async def read_memory(user_id: str):
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
     memorys = memory_data.get(user_id, [])
     if not memorys:
         return '好像对ta还没有任何记忆呢~'
-    return '这些是有关ta的记忆:' + '\\n'.join(memorys)

async func organize_memories()

Source code or View on GitHub
python
async def organize_memories():
+    return '这些是有关ta的记忆:' + '\\n'.join(memorys)

async func organize_memories()

Source code or View on GitHub
python
async def organize_memories():
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
     for i in memory_data:
diff --git a/dev/api/azure.html b/dev/api/azure.html
index a5f4a67b..ab4fda35 100644
--- a/dev/api/azure.html
+++ b/dev/api/azure.html
@@ -198,7 +198,7 @@
         await UniMessage(str(e) + suggest_solution(str(e))).send()
         traceback.print_exc()
         return

var marshoai_plugin_dirs

  • 说明: 加载内置插件

  • 默认值: config.marshoai_plugin_dirs

var text

  • 说明: type: ignore

  • 默认值: event.get_message()

- + \ No newline at end of file diff --git a/dev/api/azure_onebot.html b/dev/api/azure_onebot.html index a09221e9..1eb949b9 100644 --- a/dev/api/azure_onebot.html +++ b/dev/api/azure_onebot.html @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/dev/api/config.html b/dev/api/config.html index e1dd2571..02e7b481 100644 --- a/dev/api/config.html +++ b/dev/api/config.html @@ -38,7 +38,7 @@ logger.info(f'新增配置项: {key} = {value}') old_config[key] = value return old_config
- + \ No newline at end of file diff --git a/dev/api/constants.html b/dev/api/constants.html index eb86c1fb..503decfc 100644 --- a/dev/api/constants.html +++ b/dev/api/constants.html @@ -20,7 +20,7 @@
- + \ No newline at end of file diff --git a/dev/api/deal_latex.html b/dev/api/deal_latex.html index b458aa54..f4aced0f 100644 --- a/dev/api/deal_latex.html +++ b/dev/api/deal_latex.html @@ -114,7 +114,7 @@ results = await asyncio.gather(*(channel_test_wrapper(channel) for channel in channel_list)) best_channel = min(results, key=lambda x: x[0])[1] return best_channel()

attr channel: ConvertChannel = NO_DEFAULT

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

var dir_list

- + \ No newline at end of file diff --git a/dev/api/hunyuan.html b/dev/api/hunyuan.html index 64cb4f3d..7d97e02c 100644 --- a/dev/api/hunyuan.html +++ b/dev/api/hunyuan.html @@ -29,7 +29,7 @@ await UniMessage.image(url=url).send() except Exception as e: traceback.print_exc() - + \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index ccf0a260..a7194df8 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -20,7 +20,7 @@
Skip to content

模块 nonebot_plugin_marshoai

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

- + \ No newline at end of file diff --git a/dev/api/metadata.html b/dev/api/metadata.html index bc06a963..55d1938e 100644 --- a/dev/api/metadata.html +++ b/dev/api/metadata.html @@ -20,7 +20,7 @@
Skip to content

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

- + \ No newline at end of file diff --git a/dev/api/models.html b/dev/api/models.html index c4c1fa9a..826335b3 100644 --- a/dev/api/models.html +++ b/dev/api/models.html @@ -97,7 +97,7 @@ if not self.tools_list or not config.marshoai_enable_tools: return None return self.tools_list - + \ No newline at end of file diff --git a/dev/api/observer.html b/dev/api/observer.html index 11e8acc5..fd55ce7e 100644 --- a/dev/api/observer.html +++ b/dev/api/observer.html @@ -55,7 +55,7 @@ observer.schedule(code_modified_handler, directory, recursive=recursive) return func return decorator - + \ No newline at end of file diff --git a/dev/api/plugin/func_call/caller.html b/dev/api/plugin/func_call/caller.html index 7c0ea849..9aebe96b 100644 --- a/dev/api/plugin/func_call/caller.html +++ b/dev/api/plugin/func_call/caller.html @@ -119,7 +119,7 @@ caller = Caller(name=name, description=description) return caller

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

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

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

源代码在GitHub上查看
python
def get_function_calls() -> dict[str, Caller]:
     return _caller_data
- + \ No newline at end of file diff --git a/dev/api/plugin/func_call/index.html b/dev/api/plugin/func_call/index.html index 7538c3f9..9fdd2419 100644 --- a/dev/api/plugin/func_call/index.html +++ b/dev/api/plugin/func_call/index.html @@ -20,7 +20,7 @@
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 e0920897..653e3dd9 100644 --- a/dev/api/plugin/func_call/models.html +++ b/dev/api/plugin/func_call/models.html @@ -20,7 +20,7 @@
Skip to content

模块 nonebot_plugin_marshoai.plugin.func_call.models

class SessionContext(BaseModel)

attr bot: Bot = NO_DEFAULT

attr event: Event = NO_DEFAULT

attr matcher: Matcher = NO_DEFAULT

attr state: T_State = NO_DEFAULT

attr caller: Any = None

class SessionContextDepends(BaseModel)

attr bot: str | None = None

attr event: str | None = None

attr matcher: str | None = None

attr state: str | None = None

attr caller: str | None = None

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

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

attr type_: str = NO_DEFAULT

attr description: str = NO_DEFAULT

attr default: Any = None

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

attr required: bool = False

class String(Parameter)

attr type_: str = ParamTypes.STRING

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

attr enum: list[str] | None = None

class Integer(Parameter)

attr type_: str = ParamTypes.INTEGER

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

attr minimum: int | None = None

attr maximum: int | None = None

class Array(Parameter)

attr type_: str = ParamTypes.ARRAY

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

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

class FunctionCall(BaseModel)


func hash self => int

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

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

说明: 生成函数描述信息

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

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

attr name: str = NO_DEFAULT

attr description: str = NO_DEFAULT

attr arguments: dict[str, Parameter] = NO_DEFAULT

attr function: FUNCTION_CALL_FUNC = NO_DEFAULT

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

- + \ No newline at end of file diff --git a/dev/api/plugin/func_call/utils.html b/dev/api/plugin/func_call/utils.html index 358c96ea..1f65a120 100644 --- a/dev/api/plugin/func_call/utils.html +++ b/dev/api/plugin/func_call/utils.html @@ -39,7 +39,7 @@ return False func_ = getattr(call, '__call__', None) return inspect.iscoroutinefunction(func_) - + \ No newline at end of file diff --git a/dev/api/plugin/index.html b/dev/api/plugin/index.html index 0ad15362..2f768aab 100644 --- a/dev/api/plugin/index.html +++ b/dev/api/plugin/index.html @@ -20,7 +20,7 @@
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 ac387301..d52961d1 100644 --- a/dev/api/plugin/load.html +++ b/dev/api/plugin/load.html @@ -69,7 +69,7 @@ logger.opt(colors=True).error(f'重新加载插件失败 "<r>{plugin.name}</r>"') traceback.print_exc() return None

var module

var module_name

var module_name

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

模块 nonebot_plugin_marshoai.plugin.models

class PluginMetadata(BaseModel)

attr name: str = NO_DEFAULT

attr description: str = ''

attr usage: str = ''

attr author: str = ''

attr homepage: str = ''

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

class Plugin(BaseModel)


func hash self => int

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

func self == other: Any => bool

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

attr name: str = NO_DEFAULT

attr module: ModuleType = NO_DEFAULT

attr module_name: str = NO_DEFAULT

attr module_path: str | None = NO_DEFAULT

attr metadata: PluginMetadata | None = None

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

- + \ No newline at end of file diff --git a/dev/api/plugin/register.html b/dev/api/plugin/register.html index a11d6e68..5006e145 100644 --- a/dev/api/plugin/register.html +++ b/dev/api/plugin/register.html @@ -29,7 +29,7 @@ name = func.__name__ description = func.__doc__ logger.info(f'注册函数: {name} {description}') - + \ No newline at end of file diff --git a/dev/api/plugin/typing.html b/dev/api/plugin/typing.html index c48dae2a..754f3e8d 100644 --- a/dev/api/plugin/typing.html +++ b/dev/api/plugin/typing.html @@ -20,7 +20,7 @@
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 bc5bb198..3ad05ae1 100644 --- a/dev/api/plugin/utils.html +++ b/dev/api/plugin/utils.html @@ -26,7 +26,7 @@ else: return '.'.join(rel_path.parts[:-1] + (rel_path.stem,))

func parse_function_docsring()

源代码在GitHub上查看
python
def parse_function_docsring():
     pass
- + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/chat.html b/dev/api/plugins/builtin_tools/chat.html index 9ea83c98..5c0c18f0 100644 --- a/dev/api/plugins/builtin_tools/chat.html +++ b/dev/api/plugins/builtin_tools/chat.html @@ -43,7 +43,7 @@ return '发送完成' except Exception as e: return '发送失败: ' + str(e) - + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/file_io.html b/dev/api/plugins/builtin_tools/file_io.html index 425e7bc1..54a9f2fa 100644 --- a/dev/api/plugins/builtin_tools/file_io.html +++ b/dev/api/plugins/builtin_tools/file_io.html @@ -33,7 +33,7 @@ return '写入成功' except Exception as e: return '写入出错: ' + str(e) - + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/index.html b/dev/api/plugins/builtin_tools/index.html index 11b56d39..3f1dea0b 100644 --- a/dev/api/plugins/builtin_tools/index.html +++ b/dev/api/plugins/builtin_tools/index.html @@ -20,7 +20,7 @@
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 b9942bdc..46f76306 100644 --- a/dev/api/plugins/builtin_tools/liteyuki.html +++ b/dev/api/plugins/builtin_tools/liteyuki.html @@ -29,7 +29,7 @@ response = await client.get('https://api.liteyuki.icu/online') online = response.json().get('online') return f'注册节点数: {register}\n在线节点数: {online}' - + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/manager.html b/dev/api/plugins/builtin_tools/manager.html index 7140d595..2e4497de 100644 --- a/dev/api/plugins/builtin_tools/manager.html +++ b/dev/api/plugins/builtin_tools/manager.html @@ -28,7 +28,7 @@ else: reply += f'名称: {p.name},描述: 暂无\n' return reply - + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/network.html b/dev/api/plugins/builtin_tools/network.html index d85d7dc6..111d33cf 100644 --- a/dev/api/plugins/builtin_tools/network.html +++ b/dev/api/plugins/builtin_tools/network.html @@ -40,7 +40,7 @@ logger.error(f'marsho builtin: 获取网页内容失败: {e}') return '获取网页内容失败:' + str(e) return '未能获取到有效的网页内容' - + \ No newline at end of file diff --git a/dev/api/plugins/builtin_tools/utils.html b/dev/api/plugins/builtin_tools/utils.html index 809127b4..80ebf1aa 100644 --- a/dev/api/plugins/builtin_tools/utils.html +++ b/dev/api/plugins/builtin_tools/utils.html @@ -22,7 +22,7 @@
Skip to content

模块 nonebot_plugin_marshoai.plugins.builtin_tools.utils


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

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

参数:

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

返回: str: 摘要

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

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

- + \ No newline at end of file diff --git a/dev/api/plugins/marshoai_bangumi/index.html b/dev/api/plugins/marshoai_bangumi/index.html index 8d6b61a2..61b2600d 100644 --- a/dev/api/plugins/marshoai_bangumi/index.html +++ b/dev/api/plugins/marshoai_bangumi/index.html @@ -47,7 +47,7 @@ except Exception as e: traceback.print_exc() return '' - + \ No newline at end of file diff --git a/dev/api/plugins/marshoai_basic/index.html b/dev/api/plugins/marshoai_basic/index.html index 08abf107..3da09308 100644 --- a/dev/api/plugins/marshoai_basic/index.html +++ b/dev/api/plugins/marshoai_basic/index.html @@ -28,7 +28,7 @@ current_lunar_date = DateTime.now().to_lunar().date_hanzify()[5:] time_prompt = f'现在的时间是 {current_time}{current_weekday_name},农历 {current_lunar_date}。' return time_prompt - + \ No newline at end of file diff --git a/dev/api/plugins/marshoai_memory/index.html b/dev/api/plugins/marshoai_memory/index.html index 5a2e3b2e..ea455998 100644 --- a/dev/api/plugins/marshoai_memory/index.html +++ b/dev/api/plugins/marshoai_memory/index.html @@ -13,13 +13,13 @@ - + -
Skip to content

模块 nonebot_plugin_marshoai.plugins.marshoai_memory


@on_function_call(description='存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))

async func write_memory(memory: str, user_id: str)

源代码在GitHub上查看
python
@on_function_call(description='存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))
+    
Skip to content

模块 nonebot_plugin_marshoai.plugins.marshoai_memory


@on_function_call(description='当你发现与你对话的用户的一些信息值得你记忆,或者用户让你记忆等时,调用此函数存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))

async func write_memory(memory: str, user_id: str)

源代码在GitHub上查看
python
@on_function_call(description='当你发现与你对话的用户的一些信息值得你记忆,或者用户让你记忆等时,调用此函数存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))
 async def write_memory(memory: str, user_id: str):
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
@@ -28,19 +28,19 @@
     memory_data[user_id] = memorys
     with open(memory_path, 'w', encoding='utf-8') as f:
         json.dump(memory_data, f, ensure_ascii=False, indent=4)
-    return '记忆已经保存啦~'

@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))

async func read_memory(user_id: str)

源代码在GitHub上查看
python
@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))
+    return '记忆已经保存啦~'

@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))

async func read_memory(user_id: str)

源代码在GitHub上查看
python
@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))
 async def read_memory(user_id: str):
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
     memorys = memory_data.get(user_id, [])
     if not memorys:
         return '好像对ta还没有任何记忆呢~'
-    return '这些是有关ta的记忆:' + '\n'.join(memorys)

async func organize_memories()

源代码在GitHub上查看
python
async def organize_memories():
+    return '这些是有关ta的记忆:' + '\n'.join(memorys)

async func organize_memories()

源代码在GitHub上查看
python
async def organize_memories():
     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/plugins/twisuki_megakits/index.html b/dev/api/plugins/twisuki_megakits/index.html index 57af5a07..93b0ddff 100644 --- a/dev/api/plugins/twisuki_megakits/index.html +++ b/dev/api/plugins/twisuki_megakits/index.html @@ -28,7 +28,7 @@ return str(await mk_nya_code.nya_encrypt(msg))

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

async func nya_decrypt(msg: str) -> str

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

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

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

- + \ No newline at end of file diff --git a/dev/api/plugins/twisuki_megakits/mk_morse_code.html b/dev/api/plugins/twisuki_megakits/mk_morse_code.html index 9e42ef0b..c331dfaa 100644 --- a/dev/api/plugins/twisuki_megakits/mk_morse_code.html +++ b/dev/api/plugins/twisuki_megakits/mk_morse_code.html @@ -38,7 +38,7 @@ else: result += '?' return result - + \ No newline at end of file diff --git a/dev/api/plugins/twisuki_megakits/mk_nya_code.html b/dev/api/plugins/twisuki_megakits/mk_nya_code.html index 42de4c1b..1b4764bf 100644 --- a/dev/api/plugins/twisuki_megakits/mk_nya_code.html +++ b/dev/api/plugins/twisuki_megakits/mk_nya_code.html @@ -55,7 +55,7 @@ except Exception: return '翻译失败' return result

var char

var char

var char

var char

var char

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

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

func test_reload()

源代码在GitHub上查看
python
@on_function_call(description='重载测试')
 def test_reload():
     return 1
- + \ No newline at end of file diff --git a/dev/api/plugins_test/snowykami_testplugin/index.html b/dev/api/plugins_test/snowykami_testplugin/index.html index 71489fe7..53dde28f 100644 --- a/dev/api/plugins_test/snowykami_testplugin/index.html +++ b/dev/api/plugins_test/snowykami_testplugin/index.html @@ -43,7 +43,7 @@ except Exception as e: return '运行出错: ' + str(e) return '运行成功: ' + str(r) - + \ No newline at end of file diff --git a/dev/api/plugins_test/weather_demo.html b/dev/api/plugins_test/weather_demo.html index a375d557..f808ddae 100644 --- a/dev/api/plugins_test/weather_demo.html +++ b/dev/api/plugins_test/weather_demo.html @@ -22,7 +22,7 @@
Skip to content

模块 nonebot_plugin_marshoai.plugins_test.weather_demo


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

async func weather(location: str) -> str

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

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

- + \ No newline at end of file diff --git a/dev/api/tools/marshoai_bangumi/index.html b/dev/api/tools/marshoai_bangumi/index.html index d852f3be..49f3fd00 100644 --- a/dev/api/tools/marshoai_bangumi/index.html +++ b/dev/api/tools/marshoai_bangumi/index.html @@ -40,7 +40,7 @@ except Exception as e: traceback.print_exc() return '' - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_basic/index.html b/dev/api/tools/marshoai_basic/index.html index 3d9db0f9..6bccdf9a 100644 --- a/dev/api/tools/marshoai_basic/index.html +++ b/dev/api/tools/marshoai_basic/index.html @@ -30,7 +30,7 @@ current_lunar_date = DateTime.now().to_lunar().date_hanzify()[5:] time_prompt = f'现在的时间是{current_time}{current_weekday_name},农历{current_lunar_date}。' return time_prompt - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_megakits/index.html b/dev/api/tools/marshoai_megakits/index.html index d939d7b0..ff93e1ed 100644 --- a/dev/api/tools/marshoai_megakits/index.html +++ b/dev/api/tools/marshoai_megakits/index.html @@ -28,7 +28,7 @@ return str(await mk_morse_code.morse_decrypt(msg))

async func nya_encode(msg: str)

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

async func nya_decode(msg: str)

源代码在GitHub上查看
python
async def nya_decode(msg: str):
     return str(await mk_nya_code.nya_decode(msg))
- + \ No newline at end of file diff --git a/dev/api/tools/marshoai_megakits/mk_common.html b/dev/api/tools/marshoai_megakits/mk_common.html index 7ba0f96b..2ddcb630 100644 --- a/dev/api/tools/marshoai_megakits/mk_common.html +++ b/dev/api/tools/marshoai_megakits/mk_common.html @@ -37,7 +37,7 @@ return str(a % b) case _: return '未知运算符' - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_megakits/mk_info.html b/dev/api/tools/marshoai_megakits/mk_info.html index 327a32ee..31f6414c 100644 --- a/dev/api/tools/marshoai_megakits/mk_info.html +++ b/dev/api/tools/marshoai_megakits/mk_info.html @@ -22,7 +22,7 @@
Skip to content

模块 nonebot_plugin_marshoai.tools.marshoai_megakits.mk_info


async func twisuki()

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

async func megakits()

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

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

- + \ No newline at end of file diff --git a/dev/api/tools/marshoai_megakits/mk_morse_code.html b/dev/api/tools/marshoai_megakits/mk_morse_code.html index dabe1121..d54ad8ff 100644 --- a/dev/api/tools/marshoai_megakits/mk_morse_code.html +++ b/dev/api/tools/marshoai_megakits/mk_morse_code.html @@ -37,7 +37,7 @@ else: result += '?' return result - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_megakits/mk_nya_code.html b/dev/api/tools/marshoai_megakits/mk_nya_code.html index b44c5edf..bd90f8f4 100644 --- a/dev/api/tools/marshoai_megakits/mk_nya_code.html +++ b/dev/api/tools/marshoai_megakits/mk_nya_code.html @@ -51,7 +51,7 @@ except Exception: return '翻译失败' return result - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_memory/index.html b/dev/api/tools/marshoai_memory/index.html index 4f84313b..83f5fd38 100644 --- a/dev/api/tools/marshoai_memory/index.html +++ b/dev/api/tools/marshoai_memory/index.html @@ -38,7 +38,7 @@ memory_data = json.load(f) for i in memory_data: ... - + \ No newline at end of file diff --git a/dev/api/tools/marshoai_meogirl/index.html b/dev/api/tools/marshoai_meogirl/index.html index a6ab29c0..869d7b44 100644 --- a/dev/api/tools/marshoai_meogirl/index.html +++ b/dev/api/tools/marshoai_meogirl/index.html @@ -23,7 +23,7 @@ return mg_info.meogirl()

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

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

async func introduce(msg: str)

源代码在GitHub上查看
python
async def introduce(msg: str):
     return str(await mg_introduce.introduce(msg))
- + \ No newline at end of file diff --git a/dev/api/tools/marshoai_meogirl/mg_info.html b/dev/api/tools/marshoai_meogirl/mg_info.html index de3643cd..4f14f8e5 100644 --- a/dev/api/tools/marshoai_meogirl/mg_info.html +++ b/dev/api/tools/marshoai_meogirl/mg_info.html @@ -21,7 +21,7 @@
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'

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

- + \ 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 09aaf731..02382235 100644 --- a/dev/api/tools/marshoai_meogirl/mg_introduce.html +++ b/dev/api/tools/marshoai_meogirl/mg_introduce.html @@ -61,7 +61,7 @@ else: logger.error(f'网络错误, 状态码 : {response.status_code}') return f'网络错误, 状态码 : {response.status_code}'

var keyword

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

var soup

- + \ No newline at end of file diff --git a/dev/api/tools_wip/marshoai_memory/index.html b/dev/api/tools_wip/marshoai_memory/index.html index a35bd5b9..f2ee08d1 100644 --- a/dev/api/tools_wip/marshoai_memory/index.html +++ b/dev/api/tools_wip/marshoai_memory/index.html @@ -21,7 +21,7 @@
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 ''

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

- + \ No newline at end of file diff --git a/dev/api/util.html b/dev/api/util.html index 798ceef7..92af3d8c 100644 --- a/dev/api/util.html +++ b/dev/api/util.html @@ -164,7 +164,7 @@ result_msg.append(TextMsg(tag_found + '(未知内容解析失败)')) result_msg.append(TextMsg(await get_uuid_back2codeblock(msg[last_tag_index:], code_blank_uuid_map))) return result_msg - + \ No newline at end of file diff --git a/dev/api/util_hunyuan.html b/dev/api/util_hunyuan.html index 6adbf4e6..6415feb6 100644 --- a/dev/api/util_hunyuan.html +++ b/dev/api/util_hunyuan.html @@ -31,7 +31,7 @@ req.from_json_string(json.dumps(params)) resp = client.TextToImageLite(req) return resp.to_json_string() - + \ No newline at end of file diff --git a/dev/extension.html b/dev/extension.html index c3c18446..e8af5e8f 100644 --- a/dev/extension.html +++ b/dev/extension.html @@ -48,7 +48,7 @@ @on_function_call(description="获取机器人信息") async def get_bot_info(b: Bot) -> str: return f"机器人ID: {b.self_id}"

兼容性

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

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

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

TIP

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

插件热重载

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

WARNING

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

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

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

AIGC 自举

WARNING

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

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

其他

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

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

- + \ No newline at end of file diff --git a/dev/project.html b/dev/project.html index 1f5b5630..ceeecdb2 100644 --- a/dev/project.html +++ b/dev/project.html @@ -25,7 +25,7 @@ pip install pdm # 安装依赖管理 pdm install # 安装依赖 pre-commit install # 安装 pre-commit 钩子

代码规范

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

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

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

var marshoai_plugin_dirs

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 57618539..97361aa3 100644 --- a/en/dev/api/azure_onebot.html +++ b/en/dev/api/azure_onebot.html @@ -20,7 +20,7 @@
Skip to content

Module nonebot_plugin_marshoai.azure_onebot

The document is being improved. Suggestions are welcome.

- + \ No newline at end of file diff --git a/en/dev/api/config.html b/en/dev/api/config.html index b05dc48a..94c3adff 100644 --- a/en/dev/api/config.html +++ b/en/dev/api/config.html @@ -38,7 +38,7 @@ logger.info(f'新增配置项: {key} = {value}') old_config[key] = value return old_config - + \ No newline at end of file diff --git a/en/dev/api/constants.html b/en/dev/api/constants.html index 5c2e6b02..dda473f2 100644 --- a/en/dev/api/constants.html +++ b/en/dev/api/constants.html @@ -20,7 +20,7 @@
Skip to content

Module nonebot_plugin_marshoai.constants

The document is being improved. Suggestions are welcome.

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

attr channel: ConvertChannel = NO_DEFAULT

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

var dir_list

- + \ No newline at end of file diff --git a/en/dev/api/hunyuan.html b/en/dev/api/hunyuan.html index 3cef5b9e..38c08074 100644 --- a/en/dev/api/hunyuan.html +++ b/en/dev/api/hunyuan.html @@ -29,7 +29,7 @@ await UniMessage.image(url=url).send() except Exception as e: traceback.print_exc() - + \ No newline at end of file diff --git a/en/dev/api/index.html b/en/dev/api/index.html index f2ce7b4b..6722f510 100644 --- a/en/dev/api/index.html +++ b/en/dev/api/index.html @@ -20,7 +20,7 @@
Skip to content

Module nonebot_plugin_marshoai

The document is being improved. Suggestions are welcome.

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

The document is being improved. Suggestions are welcome.

- + \ No newline at end of file diff --git a/en/dev/api/models.html b/en/dev/api/models.html index 877c9baa..c365d827 100644 --- a/en/dev/api/models.html +++ b/en/dev/api/models.html @@ -97,7 +97,7 @@ if not self.tools_list or not config.marshoai_enable_tools: return None return self.tools_list - + \ No newline at end of file diff --git a/en/dev/api/observer.html b/en/dev/api/observer.html index 70d2c8ae..2ce51534 100644 --- a/en/dev/api/observer.html +++ b/en/dev/api/observer.html @@ -55,7 +55,7 @@ observer.schedule(code_modified_handler, directory, recursive=recursive) return func return decorator - + \ 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 c32d4bb4..f103a117 100644 --- a/en/dev/api/plugin/func_call/caller.html +++ b/en/dev/api/plugin/func_call/caller.html @@ -119,7 +119,7 @@ caller = Caller(name=name, description=description) 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
- + \ 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 010736d5..6f2714c4 100644 --- a/en/dev/api/plugin/func_call/index.html +++ b/en/dev/api/plugin/func_call/index.html @@ -20,7 +20,7 @@
Skip to content

Module nonebot_plugin_marshoai.plugin.func_call

The document is being improved. Suggestions are welcome.

- + \ 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 4ac5c1f8..ffa3e305 100644 --- a/en/dev/api/plugin/func_call/models.html +++ b/en/dev/api/plugin/func_call/models.html @@ -20,7 +20,7 @@
Skip to content

Module nonebot_plugin_marshoai.plugin.func_call.models

class SessionContext(BaseModel)

attr bot: Bot = NO_DEFAULT

attr event: Event = NO_DEFAULT

attr matcher: Matcher = NO_DEFAULT

attr state: T_State = NO_DEFAULT

attr caller: Any = None

class SessionContextDepends(BaseModel)

attr bot: str | None = None

attr event: str | None = None

attr matcher: str | None = None

attr state: str | None = None

attr caller: str | None = None

The document is being improved. Suggestions are welcome.

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

attr type_: str = NO_DEFAULT

attr description: str = NO_DEFAULT

attr default: Any = None

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

attr required: bool = False

class String(Parameter)

attr type_: str = ParamTypes.STRING

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

attr enum: list[str] | None = None

class Integer(Parameter)

attr type_: str = ParamTypes.INTEGER

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

attr minimum: int | None = None

attr maximum: int | None = None

class Array(Parameter)

attr type_: str = ParamTypes.ARRAY

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

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

class FunctionCall(BaseModel)


func hash self => int

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

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

Description: 生成函数描述信息

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

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

attr name: str = NO_DEFAULT

attr description: str = NO_DEFAULT

attr arguments: dict[str, Parameter] = NO_DEFAULT

attr function: FUNCTION_CALL_FUNC = NO_DEFAULT

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

- + \ 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 3ab57037..5a339aaa 100644 --- a/en/dev/api/plugin/func_call/utils.html +++ b/en/dev/api/plugin/func_call/utils.html @@ -39,7 +39,7 @@ return False func_ = getattr(call, '__call__', None) return inspect.iscoroutinefunction(func_) - + \ No newline at end of file diff --git a/en/dev/api/plugin/index.html b/en/dev/api/plugin/index.html index 46f8bbcb..bb42d092 100644 --- a/en/dev/api/plugin/index.html +++ b/en/dev/api/plugin/index.html @@ -20,7 +20,7 @@
Skip to content

Module nonebot_plugin_marshoai.plugin

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

The document is being improved. Suggestions are welcome.

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

var module

var module_name

var module_name

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

Module nonebot_plugin_marshoai.plugin.models

class PluginMetadata(BaseModel)

attr name: str = NO_DEFAULT

attr description: str = ''

attr usage: str = ''

attr author: str = ''

attr homepage: str = ''

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

class Plugin(BaseModel)


func hash self => int

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

func self == other: Any => bool

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

attr name: str = NO_DEFAULT

attr module: ModuleType = NO_DEFAULT

attr module_name: str = NO_DEFAULT

attr module_path: str | None = NO_DEFAULT

attr metadata: PluginMetadata | None = None

The document is being improved. Suggestions are welcome.

- + \ No newline at end of file diff --git a/en/dev/api/plugin/register.html b/en/dev/api/plugin/register.html index 93ad2826..723db043 100644 --- a/en/dev/api/plugin/register.html +++ b/en/dev/api/plugin/register.html @@ -29,7 +29,7 @@ name = func.__name__ description = func.__doc__ logger.info(f'注册函数: {name} {description}') - + \ No newline at end of file diff --git a/en/dev/api/plugin/typing.html b/en/dev/api/plugin/typing.html index d51badde..cd51cf83 100644 --- a/en/dev/api/plugin/typing.html +++ b/en/dev/api/plugin/typing.html @@ -20,7 +20,7 @@
Skip to content

Module nonebot_plugin_marshoai.plugin.typing

The document is being improved. Suggestions are welcome.

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

func parse_function_docsring()

Source code or View on GitHub
python
def parse_function_docsring():
     pass
- + \ 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 61fa208d..b3534fed 100644 --- a/en/dev/api/plugins/builtin_tools/chat.html +++ b/en/dev/api/plugins/builtin_tools/chat.html @@ -43,7 +43,7 @@ return '发送完成' except Exception as e: return '发送失败: ' + str(e) - + \ 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 0070b8be..a5308a32 100644 --- a/en/dev/api/plugins/builtin_tools/file_io.html +++ b/en/dev/api/plugins/builtin_tools/file_io.html @@ -33,7 +33,7 @@ return '写入成功' except Exception as e: return '写入出错: ' + str(e) - + \ 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 9d65e5e3..cda755b6 100644 --- a/en/dev/api/plugins/builtin_tools/index.html +++ b/en/dev/api/plugins/builtin_tools/index.html @@ -20,7 +20,7 @@
Skip to content

Module nonebot_plugin_marshoai.plugins.builtin_tools

The document is being improved. Suggestions are welcome.

- + \ 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 5f27f7a0..73d33436 100644 --- a/en/dev/api/plugins/builtin_tools/liteyuki.html +++ b/en/dev/api/plugins/builtin_tools/liteyuki.html @@ -29,7 +29,7 @@ response = await client.get('https://api.liteyuki.icu/online') online = response.json().get('online') return f'注册节点数: {register}\n在线节点数: {online}' - + \ 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 61c1833f..a0f66a30 100644 --- a/en/dev/api/plugins/builtin_tools/manager.html +++ b/en/dev/api/plugins/builtin_tools/manager.html @@ -28,7 +28,7 @@ else: reply += f'名称: {p.name},描述: 暂无\n' return reply - + \ 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 6f04ba50..20fd30b8 100644 --- a/en/dev/api/plugins/builtin_tools/network.html +++ b/en/dev/api/plugins/builtin_tools/network.html @@ -40,7 +40,7 @@ logger.error(f'marsho builtin: 获取网页内容失败: {e}') return '获取网页内容失败:' + str(e) return '未能获取到有效的网页内容' - + \ 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 ade48b13..568725c1 100644 --- a/en/dev/api/plugins/builtin_tools/utils.html +++ b/en/dev/api/plugins/builtin_tools/utils.html @@ -22,7 +22,7 @@
Skip to content

Module nonebot_plugin_marshoai.plugins.builtin_tools.utils


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

Description: 使用html内容生成摘要

Arguments:

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

Return: str: 摘要

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

The document is being improved. Suggestions are welcome.

- + \ No newline at end of file diff --git a/en/dev/api/plugins/marshoai_bangumi/index.html b/en/dev/api/plugins/marshoai_bangumi/index.html index ad11a3a7..b882df9d 100644 --- a/en/dev/api/plugins/marshoai_bangumi/index.html +++ b/en/dev/api/plugins/marshoai_bangumi/index.html @@ -47,7 +47,7 @@ except Exception as e: traceback.print_exc() return '' - + \ 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 6b2ee7b2..fc36e2ed 100644 --- a/en/dev/api/plugins/marshoai_basic/index.html +++ b/en/dev/api/plugins/marshoai_basic/index.html @@ -28,7 +28,7 @@ current_lunar_date = DateTime.now().to_lunar().date_hanzify()[5:] time_prompt = f'现在的时间是 {current_time}{current_weekday_name},农历 {current_lunar_date}。' return time_prompt - + \ No newline at end of file diff --git a/en/dev/api/plugins/marshoai_memory/index.html b/en/dev/api/plugins/marshoai_memory/index.html index 386bd41f..0582008a 100644 --- a/en/dev/api/plugins/marshoai_memory/index.html +++ b/en/dev/api/plugins/marshoai_memory/index.html @@ -13,13 +13,13 @@ - + -
Skip to content

Module nonebot_plugin_marshoai.plugins.marshoai_memory


@on_function_call(description='存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))

async func write_memory(memory: str, user_id: str)

Source code or View on GitHub
python
@on_function_call(description='存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))
+    
Skip to content

Module nonebot_plugin_marshoai.plugins.marshoai_memory


@on_function_call(description='当你发现与你对话的用户的一些信息值得你记忆,或者用户让你记忆等时,调用此函数存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))

async func write_memory(memory: str, user_id: str)

Source code or View on GitHub
python
@on_function_call(description='当你发现与你对话的用户的一些信息值得你记忆,或者用户让你记忆等时,调用此函数存储记忆内容').params(memory=String(description='你想记住的内容,概括并保留关键内容'), user_id=String(description='你想记住的人的id'))
 async def write_memory(memory: str, user_id: str):
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
@@ -28,19 +28,19 @@
     memory_data[user_id] = memorys
     with open(memory_path, 'w', encoding='utf-8') as f:
         json.dump(memory_data, f, ensure_ascii=False, indent=4)
-    return '记忆已经保存啦~'

@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))

async func read_memory(user_id: str)

Source code or View on GitHub
python
@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))
+    return '记忆已经保存啦~'

@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))

async func read_memory(user_id: str)

Source code or View on GitHub
python
@on_function_call(description='当用户与你发起对话时,你需要回忆有关他的一切,因此调用此函数读取记忆内容').params(user_id=String(description='你想读取记忆的人的id'))
 async def read_memory(user_id: str):
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
     memorys = memory_data.get(user_id, [])
     if not memorys:
         return '好像对ta还没有任何记忆呢~'
-    return '这些是有关ta的记忆:' + '\n'.join(memorys)

async func organize_memories()

Source code or View on GitHub
python
async def organize_memories():
+    return '这些是有关ta的记忆:' + '\n'.join(memorys)

async func organize_memories()

Source code or View on GitHub
python
async def organize_memories():
     with open(memory_path, 'r', encoding='utf-8') as f:
         memory_data = json.load(f)
     for i in memory_data:
         ...

The document is being improved. Suggestions are welcome.

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

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

async func nya_decrypt(msg: str) -> str

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

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

The document is being improved. Suggestions are welcome.

- + \ No newline at end of file diff --git a/en/dev/api/plugins/twisuki_megakits/mk_morse_code.html b/en/dev/api/plugins/twisuki_megakits/mk_morse_code.html index e3f292d3..9dbbcef4 100644 --- a/en/dev/api/plugins/twisuki_megakits/mk_morse_code.html +++ b/en/dev/api/plugins/twisuki_megakits/mk_morse_code.html @@ -38,7 +38,7 @@ else: result += '?' return result - + \ 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 b4d02f10..545f0702 100644 --- a/en/dev/api/plugins/twisuki_megakits/mk_nya_code.html +++ b/en/dev/api/plugins/twisuki_megakits/mk_nya_code.html @@ -55,7 +55,7 @@ except Exception: return '翻译失败' return result

var char

var char

var char

var char

var char

- + \ 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 2c139a3d..c3358747 100644 --- a/en/dev/api/plugins_test/random_number_generator.html +++ b/en/dev/api/plugins_test/random_number_generator.html @@ -25,7 +25,7 @@ return f"生成的随机数为: {', '.join(map(str, random_numbers))}"

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

func test_reload()

Source code or View on GitHub
python
@on_function_call(description='重载测试')
 def test_reload():
     return 1
- + \ 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 46c73973..44011c6c 100644 --- a/en/dev/api/plugins_test/snowykami_testplugin/index.html +++ b/en/dev/api/plugins_test/snowykami_testplugin/index.html @@ -43,7 +43,7 @@ except Exception as e: return '运行出错: ' + str(e) return '运行成功: ' + str(r) - + \ 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 af424b31..74cc5252 100644 --- a/en/dev/api/plugins_test/weather_demo.html +++ b/en/dev/api/plugins_test/weather_demo.html @@ -22,7 +22,7 @@
Skip to content

Module nonebot_plugin_marshoai.plugins_test.weather_demo


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

async func weather(location: str) -> str

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

The document is being improved. Suggestions are welcome.

- + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_bangumi/index.html b/en/dev/api/tools/marshoai_bangumi/index.html index d21a62de..a2c3bd98 100644 --- a/en/dev/api/tools/marshoai_bangumi/index.html +++ b/en/dev/api/tools/marshoai_bangumi/index.html @@ -40,7 +40,7 @@ except Exception as e: traceback.print_exc() return '' - + \ 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 34e5915a..79ad0f6e 100644 --- a/en/dev/api/tools/marshoai_basic/index.html +++ b/en/dev/api/tools/marshoai_basic/index.html @@ -30,7 +30,7 @@ current_lunar_date = DateTime.now().to_lunar().date_hanzify()[5:] time_prompt = f'现在的时间是{current_time}{current_weekday_name},农历{current_lunar_date}。' return time_prompt - + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_megakits/index.html b/en/dev/api/tools/marshoai_megakits/index.html index 1c5e3a1f..3bb9d1b2 100644 --- a/en/dev/api/tools/marshoai_megakits/index.html +++ b/en/dev/api/tools/marshoai_megakits/index.html @@ -28,7 +28,7 @@ return str(await mk_morse_code.morse_decrypt(msg))

async func nya_encode(msg: str)

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

async func nya_decode(msg: str)

Source code or View on GitHub
python
async def nya_decode(msg: str):
     return str(await mk_nya_code.nya_decode(msg))
- + \ 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 147c0add..5af96153 100644 --- a/en/dev/api/tools/marshoai_megakits/mk_common.html +++ b/en/dev/api/tools/marshoai_megakits/mk_common.html @@ -37,7 +37,7 @@ return str(a % b) case _: return '未知运算符' - + \ 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 b5eeb5c2..592a568c 100644 --- a/en/dev/api/tools/marshoai_megakits/mk_info.html +++ b/en/dev/api/tools/marshoai_megakits/mk_info.html @@ -22,7 +22,7 @@
Skip to content

Module nonebot_plugin_marshoai.tools.marshoai_megakits.mk_info


async func twisuki()

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

async func megakits()

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

The document is being improved. Suggestions are welcome.

- + \ No newline at end of file diff --git a/en/dev/api/tools/marshoai_megakits/mk_morse_code.html b/en/dev/api/tools/marshoai_megakits/mk_morse_code.html index 0e514177..9ca31932 100644 --- a/en/dev/api/tools/marshoai_megakits/mk_morse_code.html +++ b/en/dev/api/tools/marshoai_megakits/mk_morse_code.html @@ -37,7 +37,7 @@ else: result += '?' return result - + \ 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 66c41608..c37b8348 100644 --- a/en/dev/api/tools/marshoai_megakits/mk_nya_code.html +++ b/en/dev/api/tools/marshoai_megakits/mk_nya_code.html @@ -51,7 +51,7 @@ except Exception: return '翻译失败' return result - + \ 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 5069d8f9..c9b632e7 100644 --- a/en/dev/api/tools/marshoai_memory/index.html +++ b/en/dev/api/tools/marshoai_memory/index.html @@ -38,7 +38,7 @@ memory_data = json.load(f) for i in memory_data: ... - + \ 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 f762c08e..a9ac763e 100644 --- a/en/dev/api/tools/marshoai_meogirl/index.html +++ b/en/dev/api/tools/marshoai_meogirl/index.html @@ -23,7 +23,7 @@ return mg_info.meogirl()

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

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

async func introduce(msg: str)

Source code or View on GitHub
python
async def introduce(msg: str):
     return str(await mg_introduce.introduce(msg))
- + \ 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 282c3883..293fe40c 100644 --- a/en/dev/api/tools/marshoai_meogirl/mg_info.html +++ b/en/dev/api/tools/marshoai_meogirl/mg_info.html @@ -21,7 +21,7 @@
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.

- + \ 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 c4d693d3..fb44d863 100644 --- a/en/dev/api/tools/marshoai_meogirl/mg_introduce.html +++ b/en/dev/api/tools/marshoai_meogirl/mg_introduce.html @@ -61,7 +61,7 @@ else: logger.error(f'网络错误, 状态码 : {response.status_code}') return f'网络错误, 状态码 : {response.status_code}'

var keyword

- + \ 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 507316bd..597d2a95 100644 --- a/en/dev/api/tools/marshoai_meogirl/mg_search.html +++ b/en/dev/api/tools/marshoai_meogirl/mg_search.html @@ -58,7 +58,7 @@ else: logger.error(f'网络错误, 状态码 : {response.status_code}') return f'网络错误, 状态码 : {response.status_code}'

var soup

- + \ 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 9f1e265e..113cf17f 100644 --- a/en/dev/api/tools_wip/marshoai_memory/index.html +++ b/en/dev/api/tools_wip/marshoai_memory/index.html @@ -21,7 +21,7 @@
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.

- + \ No newline at end of file diff --git a/en/dev/api/util.html b/en/dev/api/util.html index 85cd6e86..023415d9 100644 --- a/en/dev/api/util.html +++ b/en/dev/api/util.html @@ -164,7 +164,7 @@ result_msg.append(TextMsg(tag_found + '(未知内容解析失败)')) result_msg.append(TextMsg(await get_uuid_back2codeblock(msg[last_tag_index:], code_blank_uuid_map))) return result_msg - + \ No newline at end of file diff --git a/en/dev/api/util_hunyuan.html b/en/dev/api/util_hunyuan.html index 35119e57..22643359 100644 --- a/en/dev/api/util_hunyuan.html +++ b/en/dev/api/util_hunyuan.html @@ -31,7 +31,7 @@ req.from_json_string(json.dumps(params)) resp = client.TextToImageLite(req) return resp.to_json_string() - + \ No newline at end of file diff --git a/en/dev/index.html b/en/dev/index.html index 5c95a2f1..27f08fa3 100644 --- a/en/dev/index.html +++ b/en/dev/index.html @@ -20,7 +20,7 @@
Skip to content

DEV

The document is being improved. Suggestions are welcome.

- + \ No newline at end of file diff --git a/en/index.html b/en/index.html index f2b9a716..24fabae1 100644 --- a/en/index.html +++ b/en/index.html @@ -20,7 +20,7 @@
Skip to content

MarshoAI

A kawaii cat

Kawaii, intelligent and extensible AI service plugin

Marsho LogoMarsho Logo

The document is being improved. Suggestions are welcome.

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

The document is being improved. Suggestions are welcome.

- + \ No newline at end of file diff --git a/en/start/install.html b/en/start/install.html index 701e3418..75cc71f2 100644 --- a/en/start/install.html +++ b/en/start/install.html @@ -38,7 +38,7 @@ ... ] }

⚙️ Configurable options

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

plugin behaviour

OptionTypeDefaultDescription
MARSHOAI_USE_YAML_CONFIGboolfalseUse YAML config format
MARSHOAI_DEVMODEbooltrueTurn on Development Mode or not

Marsho usage

OptionTypeDefaultDescription
MARSHOAI_DEFAULT_NAMEstrmarshoCommand to call Marsho
MARSHOAI_ALIASESset[str]set{"Marsho"}Other name(Alias) to call Marsho
MARSHOAI_ATboolfalseCall by @ or not
MARSHOAI_MAIN_COLOURstrFFAAAATheme color, used by some tools and features

AI call

OptionTypeDefaultDescription
MARSHOAI_TOKENstrThe token needed to call AI API
MARSHOAI_DEFAULT_MODELstrgpt-4o-miniThe default model of Marsho
MARSHOAI_PROMPTstrCatgirl Marsho's character promptMarsho's basic system prompt ※Some models(o1 and so on) don't support it
MARSHOAI_ADDITIONAL_PROMPTstrMarsho's external system prompt
MARSHOAI_ENFORCE_NICKNAMEbooltrueEnforce user to set nickname or not
MARSHOAI_POKE_SUFFIXstr揉了揉你的猫耳When double click Marsho who connected to OneBot adapter, the chat content. When it's empty string, double click function is off. Such as, the default content is *[昵称]揉了揉你的猫耳。
MARSHOAI_AZURE_ENDPOINTstrhttps://models.inference.ai.azure.comOpenAI standard API
MARSHOAI_TEMPERATUREfloatnulltemperature parameter
MARSHOAI_TOP_PfloatnullNucleus Sampling parameter
MARSHOAI_MAX_TOKENSintnullMax token number
MARSHOAI_ADDITIONAL_IMAGE_MODELSlist[]External image-support model list, such as hunyuan-vision

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_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
- + \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index 2d765b9c..c93fe34d 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"dev_api_azure.md":"DSxYEtLR","dev_api_azure_onebot.md":"DliYN1AC","dev_api_config.md":"DPhWLbgA","dev_api_constants.md":"COUvrVsB","dev_api_deal_latex.md":"BHqEOPeJ","dev_api_dev.md":"Ccm3yRuv","dev_api_hunyuan.md":"BlfnnfOj","dev_api_index.md":"nk8xRpuY","dev_api_metadata.md":"DuwfICvc","dev_api_models.md":"CgLdjxsB","dev_api_observer.md":"DT1gjhZz","dev_api_plugin_func_call_caller.md":"mnvKqrlO","dev_api_plugin_func_call_index.md":"Bqw5tQW-","dev_api_plugin_func_call_models.md":"Dc3VtyTm","dev_api_plugin_func_call_params.md":"DiWzq0qB","dev_api_plugin_func_call_utils.md":"Clxbmoa_","dev_api_plugin_index.md":"BmDghsRl","dev_api_plugin_load.md":"BU7o1SS-","dev_api_plugin_models.md":"DHUdPRO4","dev_api_plugin_register.md":"lutPV_qc","dev_api_plugin_typing.md":"DnelcG5M","dev_api_plugin_utils.md":"HLf220nR","dev_api_plugins_builtin_tools_chat.md":"_JLkK_xe","dev_api_plugins_builtin_tools_file_io.md":"DhezY7eP","dev_api_plugins_builtin_tools_index.md":"CGYuROYT","dev_api_plugins_builtin_tools_liteyuki.md":"Ccvp1i0A","dev_api_plugins_builtin_tools_manager.md":"FZdlHwdi","dev_api_plugins_builtin_tools_network.md":"CbJ2_JKg","dev_api_plugins_builtin_tools_utils.md":"BdZFnORR","dev_api_plugins_marshoai_bangumi_index.md":"BISwguXc","dev_api_plugins_marshoai_basic_index.md":"CI0HOmlG","dev_api_plugins_marshoai_memory_index.md":"Dyu1AfVH","dev_api_plugins_test_random_number_generator.md":"BN1RJ_gE","dev_api_plugins_test_snowykami_testplugin_index.md":"BW2hgbZP","dev_api_plugins_test_weather_demo.md":"MzxeNGEN","dev_api_plugins_twisuki_megakits_index.md":"CfYfZ3vW","dev_api_plugins_twisuki_megakits_mk_morse_code.md":"M_qneoyb","dev_api_plugins_twisuki_megakits_mk_nya_code.md":"k-nKw0A7","dev_api_tools_marshoai_bangumi_index.md":"AXTRK7rX","dev_api_tools_marshoai_basic_index.md":"StqdA1B_","dev_api_tools_marshoai_megakits_index.md":"Bo5QijYI","dev_api_tools_marshoai_megakits_mk_common.md":"BsuKlgUf","dev_api_tools_marshoai_megakits_mk_info.md":"GC-2uV9u","dev_api_tools_marshoai_megakits_mk_morse_code.md":"BSuPmVfd","dev_api_tools_marshoai_megakits_mk_nya_code.md":"BSnP5yIV","dev_api_tools_marshoai_memory_index.md":"Ctx-N6M8","dev_api_tools_marshoai_meogirl_index.md":"ubR9xdyM","dev_api_tools_marshoai_meogirl_mg_info.md":"BsXM_xYq","dev_api_tools_marshoai_meogirl_mg_introduce.md":"CMlBY7k1","dev_api_tools_marshoai_meogirl_mg_search.md":"CsV4I0KU","dev_api_tools_wip_marshoai_memory_index.md":"CKUVPsBH","dev_api_util.md":"Cm9SDUe7","dev_api_util_hunyuan.md":"Bd8VeW7x","dev_extension.md":"D6UesDro","dev_index.md":"C3Mfhfz_","dev_project.md":"CDgOPv7m","en_dev_api_azure.md":"D1HEvzEP","en_dev_api_azure_onebot.md":"BHs6CFRG","en_dev_api_config.md":"MrfVWF2E","en_dev_api_constants.md":"BsTp3vLE","en_dev_api_deal_latex.md":"qC-TYu8a","en_dev_api_dev.md":"WC-Rtc6i","en_dev_api_hunyuan.md":"CqJmg8OX","en_dev_api_index.md":"BSXyKnC8","en_dev_api_metadata.md":"DbmT6BJp","en_dev_api_models.md":"DtA-Uxiw","en_dev_api_observer.md":"CjTj4563","en_dev_api_plugin_func_call_caller.md":"35f7y-XU","en_dev_api_plugin_func_call_index.md":"CoSAQPgG","en_dev_api_plugin_func_call_models.md":"C7GEAoYb","en_dev_api_plugin_func_call_params.md":"BAcQ43GZ","en_dev_api_plugin_func_call_utils.md":"C19kiJxm","en_dev_api_plugin_index.md":"CdpDM_Si","en_dev_api_plugin_load.md":"qQt8ebqD","en_dev_api_plugin_models.md":"BBmZaPWD","en_dev_api_plugin_register.md":"CHZYqDmc","en_dev_api_plugin_typing.md":"DEcWtIGI","en_dev_api_plugin_utils.md":"Ce4Fxh0X","en_dev_api_plugins_builtin_tools_chat.md":"Bea5mt0I","en_dev_api_plugins_builtin_tools_file_io.md":"DnV6GP6v","en_dev_api_plugins_builtin_tools_index.md":"C-slN8BR","en_dev_api_plugins_builtin_tools_liteyuki.md":"B8q9C1WN","en_dev_api_plugins_builtin_tools_manager.md":"DJIKmLv0","en_dev_api_plugins_builtin_tools_network.md":"BoLNHGRj","en_dev_api_plugins_builtin_tools_utils.md":"xKAq_xHt","en_dev_api_plugins_marshoai_bangumi_index.md":"DSU605fu","en_dev_api_plugins_marshoai_basic_index.md":"XtDyoElU","en_dev_api_plugins_marshoai_memory_index.md":"DbvesakZ","en_dev_api_plugins_test_random_number_generator.md":"CBMws1Px","en_dev_api_plugins_test_snowykami_testplugin_index.md":"UKcUE5jX","en_dev_api_plugins_test_weather_demo.md":"BwzDdQTe","en_dev_api_plugins_twisuki_megakits_index.md":"CCKY4F8j","en_dev_api_plugins_twisuki_megakits_mk_morse_code.md":"CQQooXuG","en_dev_api_plugins_twisuki_megakits_mk_nya_code.md":"3afeqAo5","en_dev_api_tools_marshoai_bangumi_index.md":"BBLQQu8y","en_dev_api_tools_marshoai_basic_index.md":"BfHBXbHU","en_dev_api_tools_marshoai_megakits_index.md":"CDgWMq5-","en_dev_api_tools_marshoai_megakits_mk_common.md":"CGacSSTy","en_dev_api_tools_marshoai_megakits_mk_info.md":"CmhM2f7W","en_dev_api_tools_marshoai_megakits_mk_morse_code.md":"Cb6hu4uY","en_dev_api_tools_marshoai_megakits_mk_nya_code.md":"DKfK543L","en_dev_api_tools_marshoai_memory_index.md":"BYA0eG5Z","en_dev_api_tools_marshoai_meogirl_index.md":"CWrJtdf9","en_dev_api_tools_marshoai_meogirl_mg_info.md":"CbBPYCNZ","en_dev_api_tools_marshoai_meogirl_mg_introduce.md":"D2Gq8xP7","en_dev_api_tools_marshoai_meogirl_mg_search.md":"D0FUmw3J","en_dev_api_tools_wip_marshoai_memory_index.md":"D2Jn8ErP","en_dev_api_util.md":"DSFo_qOi","en_dev_api_util_hunyuan.md":"DYGnQ6aT","en_dev_index.md":"NCDQXuGI","en_index.md":"AliMfvX2","en_start_index.md":"BCQfDlzu","en_start_install.md":"DnrtoGkW","index.md":"B4tClmp3","ja_index.md":"-kJaY-fC","start_index.md":"DDW2kOqv","start_install.md":"BxgsBP7k"} +{"dev_api_azure.md":"DSxYEtLR","dev_api_azure_onebot.md":"DliYN1AC","dev_api_config.md":"DPhWLbgA","dev_api_constants.md":"COUvrVsB","dev_api_deal_latex.md":"BHqEOPeJ","dev_api_dev.md":"Ccm3yRuv","dev_api_hunyuan.md":"BlfnnfOj","dev_api_index.md":"nk8xRpuY","dev_api_metadata.md":"DuwfICvc","dev_api_models.md":"CgLdjxsB","dev_api_observer.md":"DT1gjhZz","dev_api_plugin_func_call_caller.md":"mnvKqrlO","dev_api_plugin_func_call_index.md":"Bqw5tQW-","dev_api_plugin_func_call_models.md":"Dc3VtyTm","dev_api_plugin_func_call_params.md":"DiWzq0qB","dev_api_plugin_func_call_utils.md":"Clxbmoa_","dev_api_plugin_index.md":"BmDghsRl","dev_api_plugin_load.md":"BU7o1SS-","dev_api_plugin_models.md":"DHUdPRO4","dev_api_plugin_register.md":"lutPV_qc","dev_api_plugin_typing.md":"DnelcG5M","dev_api_plugin_utils.md":"HLf220nR","dev_api_plugins_builtin_tools_chat.md":"_JLkK_xe","dev_api_plugins_builtin_tools_file_io.md":"DhezY7eP","dev_api_plugins_builtin_tools_index.md":"CGYuROYT","dev_api_plugins_builtin_tools_liteyuki.md":"Ccvp1i0A","dev_api_plugins_builtin_tools_manager.md":"FZdlHwdi","dev_api_plugins_builtin_tools_network.md":"CbJ2_JKg","dev_api_plugins_builtin_tools_utils.md":"BdZFnORR","dev_api_plugins_marshoai_bangumi_index.md":"BISwguXc","dev_api_plugins_marshoai_basic_index.md":"CI0HOmlG","dev_api_plugins_marshoai_memory_index.md":"3vjFZfrd","dev_api_plugins_test_random_number_generator.md":"BN1RJ_gE","dev_api_plugins_test_snowykami_testplugin_index.md":"BW2hgbZP","dev_api_plugins_test_weather_demo.md":"MzxeNGEN","dev_api_plugins_twisuki_megakits_index.md":"CfYfZ3vW","dev_api_plugins_twisuki_megakits_mk_morse_code.md":"M_qneoyb","dev_api_plugins_twisuki_megakits_mk_nya_code.md":"k-nKw0A7","dev_api_tools_marshoai_bangumi_index.md":"AXTRK7rX","dev_api_tools_marshoai_basic_index.md":"StqdA1B_","dev_api_tools_marshoai_megakits_index.md":"Bo5QijYI","dev_api_tools_marshoai_megakits_mk_common.md":"BsuKlgUf","dev_api_tools_marshoai_megakits_mk_info.md":"GC-2uV9u","dev_api_tools_marshoai_megakits_mk_morse_code.md":"BSuPmVfd","dev_api_tools_marshoai_megakits_mk_nya_code.md":"BSnP5yIV","dev_api_tools_marshoai_memory_index.md":"Ctx-N6M8","dev_api_tools_marshoai_meogirl_index.md":"ubR9xdyM","dev_api_tools_marshoai_meogirl_mg_info.md":"BsXM_xYq","dev_api_tools_marshoai_meogirl_mg_introduce.md":"CMlBY7k1","dev_api_tools_marshoai_meogirl_mg_search.md":"CsV4I0KU","dev_api_tools_wip_marshoai_memory_index.md":"CKUVPsBH","dev_api_util.md":"Cm9SDUe7","dev_api_util_hunyuan.md":"Bd8VeW7x","dev_extension.md":"D6UesDro","dev_index.md":"C3Mfhfz_","dev_project.md":"CDgOPv7m","en_dev_api_azure.md":"D1HEvzEP","en_dev_api_azure_onebot.md":"BHs6CFRG","en_dev_api_config.md":"MrfVWF2E","en_dev_api_constants.md":"BsTp3vLE","en_dev_api_deal_latex.md":"qC-TYu8a","en_dev_api_dev.md":"WC-Rtc6i","en_dev_api_hunyuan.md":"CqJmg8OX","en_dev_api_index.md":"BSXyKnC8","en_dev_api_metadata.md":"DbmT6BJp","en_dev_api_models.md":"DtA-Uxiw","en_dev_api_observer.md":"CjTj4563","en_dev_api_plugin_func_call_caller.md":"35f7y-XU","en_dev_api_plugin_func_call_index.md":"CoSAQPgG","en_dev_api_plugin_func_call_models.md":"C7GEAoYb","en_dev_api_plugin_func_call_params.md":"BAcQ43GZ","en_dev_api_plugin_func_call_utils.md":"C19kiJxm","en_dev_api_plugin_index.md":"CdpDM_Si","en_dev_api_plugin_load.md":"qQt8ebqD","en_dev_api_plugin_models.md":"BBmZaPWD","en_dev_api_plugin_register.md":"CHZYqDmc","en_dev_api_plugin_typing.md":"DEcWtIGI","en_dev_api_plugin_utils.md":"Ce4Fxh0X","en_dev_api_plugins_builtin_tools_chat.md":"Bea5mt0I","en_dev_api_plugins_builtin_tools_file_io.md":"DnV6GP6v","en_dev_api_plugins_builtin_tools_index.md":"C-slN8BR","en_dev_api_plugins_builtin_tools_liteyuki.md":"B8q9C1WN","en_dev_api_plugins_builtin_tools_manager.md":"DJIKmLv0","en_dev_api_plugins_builtin_tools_network.md":"BoLNHGRj","en_dev_api_plugins_builtin_tools_utils.md":"xKAq_xHt","en_dev_api_plugins_marshoai_bangumi_index.md":"DSU605fu","en_dev_api_plugins_marshoai_basic_index.md":"XtDyoElU","en_dev_api_plugins_marshoai_memory_index.md":"CfVvzBOl","en_dev_api_plugins_test_random_number_generator.md":"CBMws1Px","en_dev_api_plugins_test_snowykami_testplugin_index.md":"UKcUE5jX","en_dev_api_plugins_test_weather_demo.md":"BwzDdQTe","en_dev_api_plugins_twisuki_megakits_index.md":"CCKY4F8j","en_dev_api_plugins_twisuki_megakits_mk_morse_code.md":"CQQooXuG","en_dev_api_plugins_twisuki_megakits_mk_nya_code.md":"3afeqAo5","en_dev_api_tools_marshoai_bangumi_index.md":"BBLQQu8y","en_dev_api_tools_marshoai_basic_index.md":"BfHBXbHU","en_dev_api_tools_marshoai_megakits_index.md":"CDgWMq5-","en_dev_api_tools_marshoai_megakits_mk_common.md":"CGacSSTy","en_dev_api_tools_marshoai_megakits_mk_info.md":"CmhM2f7W","en_dev_api_tools_marshoai_megakits_mk_morse_code.md":"Cb6hu4uY","en_dev_api_tools_marshoai_megakits_mk_nya_code.md":"DKfK543L","en_dev_api_tools_marshoai_memory_index.md":"BYA0eG5Z","en_dev_api_tools_marshoai_meogirl_index.md":"CWrJtdf9","en_dev_api_tools_marshoai_meogirl_mg_info.md":"CbBPYCNZ","en_dev_api_tools_marshoai_meogirl_mg_introduce.md":"D2Gq8xP7","en_dev_api_tools_marshoai_meogirl_mg_search.md":"D0FUmw3J","en_dev_api_tools_wip_marshoai_memory_index.md":"D2Jn8ErP","en_dev_api_util.md":"DSFo_qOi","en_dev_api_util_hunyuan.md":"DYGnQ6aT","en_dev_index.md":"NCDQXuGI","en_index.md":"AliMfvX2","en_start_index.md":"BCQfDlzu","en_start_install.md":"DnrtoGkW","index.md":"B4tClmp3","ja_index.md":"-kJaY-fC","start_index.md":"DDW2kOqv","start_install.md":"BxgsBP7k"} diff --git a/index.html b/index.html index 6d2e5e9f..9f226e26 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@
Skip to content

小棉智能

猫娘机器人

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

Marsho LogoMarsho Logo

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

- + \ No newline at end of file diff --git a/ja/index.html b/ja/index.html index 6839a5dc..cc73b168 100644 --- a/ja/index.html +++ b/ja/index.html @@ -20,7 +20,7 @@
Skip to content

小綿智能

猫娘ロボット

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

MarshoロゴMarshoロゴ

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

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

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

- + \ No newline at end of file diff --git a/start/install.html b/start/install.html index 290f80e0..6ea83cb1 100644 --- a/start/install.html +++ b/start/install.html @@ -38,7 +38,7 @@ ... ] }

⚙️ 可配置项

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

插件行为

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

Marsho 使用方式

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

AI 调用

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

功能开关

配置项类型默认值说明
MARSHOAI_ENABLE_SUPPORT_IMAGE_TIPbooltrue启用后用户发送带图请求时若模型不支持图片,则提示用户
MARSHOAI_ENABLE_NICKNAME_TIPbooltrue启用后用户未设置昵称时提示用户设置
MARSHOAI_ENABLE_PRAISESbooltrue是否启用夸赞名单功能
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_DEVMODEboolfalse是否启用开发者模式
- + \ No newline at end of file