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

Commit

Permalink
bing图像生成和bard不再仅支持英文
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoXinYo committed Sep 21, 2023
1 parent 8000db8 commit 9200815
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions view/bard.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ async def ask(request: Request) -> Response:
token = parameter.get('token')
if not question:
return core.GenerateResponse().error(110, '参数不能为空')
elif not auxiliary.isEnglish(question):
return core.GenerateResponse().error(110, 'question仅支持英文')

if token:
chatBot = chat_bot.getChatBot(token)
Expand Down
2 changes: 0 additions & 2 deletions view/bing.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,5 @@ async def image(request: Request) -> Response:
keyword = (await core.getRequestParameter(request)).get('keyword')
if not keyword:
return core.GenerateResponse().error(110, '参数不能为空')
elif not auxiliary.isEnglish(keyword):
return core.GenerateResponse().error(110, 'keyword仅支持英文')

return core.GenerateResponse().success(BingImageCreator.ImageGen(IMAGE_COOKIE, all_cookies=chat_bot.BING_COOKIE).get_images(keyword))

0 comments on commit 9200815

Please sign in to comment.