diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-04-07 00:05:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-07 00:05:19 +0200 |
commit | e418c03aa074804b901633639ff42e0f088a52cf (patch) | |
tree | 66c9f0bd82fd09cc2e8101ef5dca305b3be1b7de /g4f/Provider/Liaobots.py | |
parent | Update HuggingChat.py (diff) | |
download | gpt4free-e418c03aa074804b901633639ff42e0f088a52cf.tar gpt4free-e418c03aa074804b901633639ff42e0f088a52cf.tar.gz gpt4free-e418c03aa074804b901633639ff42e0f088a52cf.tar.bz2 gpt4free-e418c03aa074804b901633639ff42e0f088a52cf.tar.lz gpt4free-e418c03aa074804b901633639ff42e0f088a52cf.tar.xz gpt4free-e418c03aa074804b901633639ff42e0f088a52cf.tar.zst gpt4free-e418c03aa074804b901633639ff42e0f088a52cf.zip |
Diffstat (limited to 'g4f/Provider/Liaobots.py')
-rw-r--r-- | g4f/Provider/Liaobots.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/g4f/Provider/Liaobots.py b/g4f/Provider/Liaobots.py index a16b3cb3..b3bd6540 100644 --- a/g4f/Provider/Liaobots.py +++ b/g4f/Provider/Liaobots.py @@ -124,14 +124,12 @@ class Liaobots(AsyncGeneratorProvider, ProviderModelMixin): if not cls._auth_code: async with session.post( "https://liaobots.work/recaptcha/api/login", - proxy=proxy, data={"token": "abcdefghijklmnopqrst"}, verify_ssl=False ) as response: await raise_for_status(response) async with session.post( "https://liaobots.work/api/user", - proxy=proxy, json={"authcode": ""}, verify_ssl=False ) as response: @@ -148,7 +146,6 @@ class Liaobots(AsyncGeneratorProvider, ProviderModelMixin): } async with session.post( "https://liaobots.work/api/chat", - proxy=proxy, json=data, headers={"x-auth-code": cls._auth_code}, verify_ssl=False @@ -158,4 +155,4 @@ class Liaobots(AsyncGeneratorProvider, ProviderModelMixin): if b"<html coupert-item=" in chunk: raise RuntimeError("Invalid session") if chunk: - yield chunk.decode() + yield chunk.decode(errors="ignore") |