import{_ as i,c as a,o as n,ae as e}from"./chunks/framework.AELpvxz7.js";const g=JSON.parse('{"title":"hunyuan","description":"","frontmatter":{"title":"hunyuan","order":100},"headers":[],"relativePath":"dev/api/hunyuan.md","filePath":"zh/dev/api/hunyuan.md","lastUpdated":1734175019000}'),t={name:"dev/api/hunyuan.md"};function h(p,s,l,k,r,d){return n(),a("div",null,s[0]||(s[0]=[e(`
nonebot_plugin_marshoai.hunyuan
@genimage_cmd.handle()
genimage(event: Event, prompt = None)
@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()