From 44634e6b34268e3236aba379ba9482bec583ee7a Mon Sep 17 00:00:00 2001 From: student_2333 Date: Sun, 10 Mar 2024 14:41:21 +0800 Subject: [PATCH] fix --- README.md | 4 ++++ nonebot_plugin_riffusion/__init__.py | 2 +- nonebot_plugin_riffusion/__main__.py | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ee14950..de2dd15 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,10 @@ Telegram:[@lgc2333](https://t.me/lgc2333) ## 📝 更新日志 +### 0.2.1 + +- 修 Bug + ### 0.2.0 - 适配 Pydantic V1 & V2 diff --git a/nonebot_plugin_riffusion/__init__.py b/nonebot_plugin_riffusion/__init__.py index d0e6bfd..17f279e 100644 --- a/nonebot_plugin_riffusion/__init__.py +++ b/nonebot_plugin_riffusion/__init__.py @@ -5,7 +5,7 @@ from . import __main__ as __main__ # noqa: E402 from .config import ConfigModel # noqa: E402 -__version__ = "0.2.0" +__version__ = "0.2.1" __plugin_meta__ = PluginMetadata( name="Riffusion", description="你给歌词,AI 作曲", diff --git a/nonebot_plugin_riffusion/__main__.py b/nonebot_plugin_riffusion/__main__.py index 7682aa8..68cc960 100644 --- a/nonebot_plugin_riffusion/__main__.py +++ b/nonebot_plugin_riffusion/__main__.py @@ -58,8 +58,8 @@ async def do(): class RiffusionBehavior(ArparmaBehavior): def operate(self, interface: Arparma): - style: Optional[str] = interface["style"] - prompt: Optional[str] = interface["prompt"] + style: Optional[str] = interface["style"].value + prompt: Optional[str] = interface["prompt"].value random_lyrics: bool = interface["random-lyrics"].value lyrics: Optional[str] = interface["lyrics"] @@ -137,8 +137,8 @@ async def _(matcher: AlconnaMatcher, res: CommandResult): @cmd_riffusion.handle() async def _(matcher: AlconnaMatcher, parma: Arparma): - style: Optional[str] = parma["style"] - custom_prompt: Optional[str] = parma["prompt"] + style: Optional[str] = parma["style"].value + custom_prompt: Optional[str] = parma["prompt"].value use_random_lyrics: bool = parma["random-lyrics"].value lyrics: str = get_random_lyrics() if use_random_lyrics else parma["lyrics"]