mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-08-02 11:40:04 +00:00
✨ 添加开发文档和 API 文档的初始结构;更新 .gitignore 以排除生成的文档目录
This commit is contained in:
27
docs/zh/dev/api/hunyuan.md
Normal file
27
docs/zh/dev/api/hunyuan.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
title: hunyuan
|
||||
---
|
||||
# **模块** `nonebot_plugin_marshoai.hunyuan`
|
||||
|
||||
---
|
||||
`@genimage_cmd.handle()`
|
||||
### ***async func*** `genimage(event: Event, prompt = None)`
|
||||
|
||||
|
||||
<details>
|
||||
<summary> <b>源代码</b> 或 <a href='https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/hunyuan.py#L29' target='_blank'>在GitHub上查看</a></summary>
|
||||
|
||||
```python
|
||||
@genimage_cmd.handle()
|
||||
async def genimage(event: Event, prompt=None):
|
||||
if not prompt:
|
||||
await genimage_cmd.finish('无提示词')
|
||||
try:
|
||||
result = generate_image(prompt)
|
||||
url = json.loads(result)['ResultImage']
|
||||
await UniMessage.image(url=url).send()
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
```
|
||||
</details>
|
||||
|
Reference in New Issue
Block a user