nonebot-plugin-marshoai/assets/dev_api_plugins_test_weather_demo.md.DqU_unWp.js

2 lines
3.5 KiB
JavaScript
Raw Normal View History

import{_ as i,c as a,o as t,ae as e}from"./chunks/framework.AELpvxz7.js";const c=JSON.parse('{"title":"weather_demo","description":"","frontmatter":{"title":"weather_demo","order":100},"headers":[],"relativePath":"dev/api/plugins_test/weather_demo.md","filePath":"zh/dev/api/plugins_test/weather_demo.md","lastUpdated":null}'),n={name:"dev/api/plugins_test/weather_demo.md"};function h(l,s,r,o,p,d){return t(),a("div",null,s[0]||(s[0]=[e('<h1 id="模块-nonebot-plugin-marshoai-plugins-test-weather-demo" tabindex="-1"><strong>模块</strong> <code>nonebot_plugin_marshoai.plugins_test.weather_demo</code> <a class="header-anchor" href="#模块-nonebot-plugin-marshoai-plugins-test-weather-demo" aria-label="Permalink to &quot;**模块** `nonebot_plugin_marshoai.plugins_test.weather_demo`&quot;"></a></h1><hr><p><code>@on_function_call(description=&#39;可以用于查询天气&#39;).params(location=String(description=&#39;地点&#39;))</code></p><h3 id="async-func-weather-location-str-str" tabindex="-1"><em><strong>async func</strong></em> <code>weather(location: str) -&gt; str</code> <a class="header-anchor" href="#async-func-weather-location-str-str" aria-label="Permalink to &quot;***async func*** `weather(location: str) -&gt; str`&quot;"></a></h3><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/plugins_test/weather_demo.py#L11" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@on_function_call</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;可以用于查询天气&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic;">.params(location=String(description=&#39;地点&#39;))</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> weather</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(location: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">location</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">的天气是晴天, 温度是25°C&#39;</span></span></code></pre></div></details>',5)]))}const g=i(n,[["render",h]]);export{c as __pageData,g as default};