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

XFEstudio/gpt4free

Update Liaobots.py

e418c03a
H Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +1 -4
Modified g4f/Provider/Liaobots.py +1 -4
@@ -124,14 +124,12 @@ class Liaobots(AsyncGeneratorProvider, ProviderModelMixin):
124 124 if not cls._auth_code:
125 125 async with session.post(
126 126 "https://liaobots.work/recaptcha/api/login",
127 proxy=proxy,
128 127 data={"token": "abcdefghijklmnopqrst"},
129 128 verify_ssl=False
130 129 ) as response:
131 130 await raise_for_status(response)
132 131 async with session.post(
133 132 "https://liaobots.work/api/user",
134 proxy=proxy,
135 133 json={"authcode": ""},
136 134 verify_ssl=False
137 135 ) as response:
@@ -148,7 +146,6 @@ class Liaobots(AsyncGeneratorProvider, ProviderModelMixin):
148 146 }
149 147 async with session.post(
150 148 "https://liaobots.work/api/chat",
151 proxy=proxy,
152 149 json=data,
153 150 headers={"x-auth-code": cls._auth_code},
154 151 verify_ssl=False
@@ -158,4 +155,4 @@ class Liaobots(AsyncGeneratorProvider, ProviderModelMixin):
158 155 if b"<html coupert-item=" in chunk:
159 156 raise RuntimeError("Invalid session")
160 157 if chunk:
161 yield chunk.decode()
158 yield chunk.decode(errors="ignore")