XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Update Qwen.py

d7a9029c
Ammar <ammar.alkotb@gmail.com>
提交于

代码差异

1 个文件 +2 -2
Modified g4f/Provider/Qwen.py +2 -2
@@ -422,7 +422,7 @@ class Qwen(AsyncGeneratorProvider, ProviderModelMixin):
422 422 }
423 423 async with session.post(
424 424 f'{cls.url}/api/v2/chats/new', json=chat_payload, headers=req_headers,
425 proxy=proxy
425 proxy=proxy,
426 426 ) as resp:
427 427 await cls.raise_for_status(resp)
428 428 data = await resp.json()
@@ -489,7 +489,7 @@ class Qwen(AsyncGeneratorProvider, ProviderModelMixin):
489 489 await cls.raise_for_status(resp)
490 490 if resp.headers.get("content-type", "").startswith("application/json"):
491 491 resp_json = await resp.json()
492 if resp_json.get("success") is False or resp_json.get("data", {}).get("code"):
492 if resp_json.get("success") is False or resp_json.get("data", {}).get("code") or 'FAIL_SYS_USER_VALIDATE' in resp_json.get("ret", []):
493 493 raise RuntimeError(f"Response: {resp_json}")
494 494 # args["cookies"] = merge_cookies(args.get("cookies"), resp)
495 495 thinking_started = False