diff options
author | abc <98614666+xtekky@users.noreply.github.com> | 2023-10-21 01:52:19 +0200 |
---|---|---|
committer | abc <98614666+xtekky@users.noreply.github.com> | 2023-10-21 01:52:19 +0200 |
commit | ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62 (patch) | |
tree | 6b24ca9b43ad4ace9347dbce2a66c000b9e12e28 /g4f/Provider/AItianhu.py | |
parent | ~ | g4f v-0.1.7.0 (diff) | |
download | gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.tar gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.tar.gz gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.tar.bz2 gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.tar.lz gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.tar.xz gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.tar.zst gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.zip |
Diffstat (limited to 'g4f/Provider/AItianhu.py')
-rw-r--r-- | g4f/Provider/AItianhu.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/g4f/Provider/AItianhu.py b/g4f/Provider/AItianhu.py index 0105c89a..18ab08d8 100644 --- a/g4f/Provider/AItianhu.py +++ b/g4f/Provider/AItianhu.py @@ -10,7 +10,7 @@ from .base_provider import AsyncGeneratorProvider, format_prompt, get_cookies class AItianhu(AsyncGeneratorProvider): url = "https://www.aitianhu.com" - working = False + working = True supports_gpt_35_turbo = True @classmethod @@ -23,9 +23,9 @@ class AItianhu(AsyncGeneratorProvider): timeout: int = 120, **kwargs) -> AsyncResult: if not cookies: - cookies = browser_cookie3.chrome(domain_name='www.aitianhu.com') + cookies = get_cookies(domain_name='www.aitianhu.com') if not cookies: - raise RuntimeError(f"g4f.provider.{cls.__name__} requires cookies") + raise RuntimeError(f"g4f.provider.{cls.__name__} requires cookies [refresh https://www.aitianhu.com on chrome]") data = { "prompt": format_prompt(messages), @@ -68,7 +68,6 @@ class AItianhu(AsyncGeneratorProvider): if b"platform's risk control" in line: raise RuntimeError("Platform's Risk Control") - print(line) line = json.loads(line) if "detail" in line: |