添加天气查询插件,更新文档以说明插件功能和安装步骤

This commit is contained in:
2024-12-15 18:53:44 +08:00
parent eb5dcb443d
commit be99a117f0
4 changed files with 255 additions and 4 deletions

View File

@ -0,0 +1,13 @@
from nonebot_plugin_marshoai.plugin import PluginMetadata, String, on_function_call
metadata = PluginMetadata(
name="天气查询", author="MarshoAI", description="一个简单的查询天气的插件"
)
@on_function_call(description="可以用于查询天气").params(
location=String(description="地点")
)
async def weather(location: str) -> str:
# 这里可以调用天气API查询天气这里只是一个简单的示例
return f"{location}的天气是晴天, 温度是25°C"