mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-08-01 07:09:50 +00:00
✨ 优化函数列表显示,添加短信息属性以改善函数调用的描述
This commit is contained in:
@ -240,6 +240,10 @@ class Caller:
|
||||
"""完整名"""
|
||||
return self.module_name + self._name
|
||||
|
||||
@property
|
||||
def short_info(self) -> str:
|
||||
return f"{self.full_name}({self._description})"
|
||||
|
||||
|
||||
def on_function_call(name: str = "", description: str | None = None) -> Caller:
|
||||
"""返回一个Caller类,可用于装饰一个函数,使其注册为一个可被AI调用的function call函数
|
||||
|
Reference in New Issue
Block a user