Skip to content
This repository has been archived by the owner on Dec 7, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lgc2333 committed Mar 10, 2024
1 parent efbe618 commit 44634e6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ Telegram:[@lgc2333](https://t.me/lgc2333)

## 📝 更新日志

### 0.2.1

- 修 Bug

### 0.2.0

- 适配 Pydantic V1 & V2
Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_riffusion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 作曲",
Expand Down
8 changes: 4 additions & 4 deletions nonebot_plugin_riffusion/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit 44634e6

Please sign in to comment.