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/Opchatgpts.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 '')
-rw-r--r-- | g4f/Provider/Opchatgpts.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/g4f/Provider/Opchatgpts.py b/g4f/Provider/Opchatgpts.py index fb0b1ac3..e56f5b40 100644 --- a/g4f/Provider/Opchatgpts.py +++ b/g4f/Provider/Opchatgpts.py @@ -10,16 +10,15 @@ from .base_provider import AsyncGeneratorProvider class Opchatgpts(AsyncGeneratorProvider): url = "https://opchatgpts.net" supports_gpt_35_turbo = True - working = True + working = False @classmethod async def create_async_generator( cls, model: str, messages: Messages, - proxy: str = None, - **kwargs - ) -> AsyncResult: + proxy: str = None, **kwargs) -> AsyncResult: + headers = { "User-Agent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36", "Accept" : "*/*", @@ -58,7 +57,6 @@ class Opchatgpts(AsyncGeneratorProvider): elif line["type"] == "end": break - @classmethod @property def params(cls): @@ -70,7 +68,6 @@ class Opchatgpts(AsyncGeneratorProvider): ] param = ", ".join([": ".join(p) for p in params]) return f"g4f.provider.{cls.__name__} supports: ({param})" - def random_string(length: int = 10): return ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(length))
\ No newline at end of file |