Skip to content

Commit

Permalink
Merge pull request #42 from fireinsect/beta
Browse files Browse the repository at this point in the history
Fixed: 匹配一下新api
  • Loading branch information
Yiyuiii authored Dec 18, 2023
2 parents 232d361 + 235f004 commit 8db668e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nonebot_plugin_moegoe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ async def cn_func(
gradioParas = list()
for k in _profileDict["gradio_paralist"]:
gradioParas.append(paras[k])
stat, wav_path = gradioClients.forward(_profileDict["url"], *gradioParas, "Text prompt", fn_index=0)
stat, wav_path = gradioClients.forward(_profileDict["url"], *gradioParas, "Text prompt", paras['text_prompt'], 0, fn_index=0)
if stat == 'Success':
message = MessageSegment.record(Path(wav_path))
else:
Expand Down Expand Up @@ -298,7 +298,7 @@ async def _(matcher: Matcher, matched: Tuple[Any, ...] = RegexGroup()):
# 通过正则把 -p 从msg中提取出来,并进行判断
match = re.search(r"(-p|--prompt) (.+)", msg)
if match:
para_dict['text_prompt'] = match.groups(1)
para_dict['text_prompt'] = match.group(2)
msg = msg.replace(match.group(), "")
# 并没有 -p 则把msg当作提示词
else:
Expand Down

0 comments on commit 8db668e

Please sign in to comment.