diff options
author | Heiner Lohaus <heiner@lohaus.eu> | 2023-10-22 08:57:31 +0200 |
---|---|---|
committer | Heiner Lohaus <heiner@lohaus.eu> | 2023-10-22 08:57:31 +0200 |
commit | 13e89d6ab9e3016741fdcbd03cc4996faec54f9a (patch) | |
tree | ff4b350e57dd8a77d8e7b41f85431bdb85118a4f /g4f/Provider/Geekgpt.py | |
parent | Add FakeGpt Provider (diff) | |
download | gpt4free-13e89d6ab9e3016741fdcbd03cc4996faec54f9a.tar gpt4free-13e89d6ab9e3016741fdcbd03cc4996faec54f9a.tar.gz gpt4free-13e89d6ab9e3016741fdcbd03cc4996faec54f9a.tar.bz2 gpt4free-13e89d6ab9e3016741fdcbd03cc4996faec54f9a.tar.lz gpt4free-13e89d6ab9e3016741fdcbd03cc4996faec54f9a.tar.xz gpt4free-13e89d6ab9e3016741fdcbd03cc4996faec54f9a.tar.zst gpt4free-13e89d6ab9e3016741fdcbd03cc4996faec54f9a.zip |
Diffstat (limited to 'g4f/Provider/Geekgpt.py')
-rw-r--r-- | g4f/Provider/Geekgpt.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/g4f/Provider/Geekgpt.py b/g4f/Provider/Geekgpt.py index 1a82757c..3bbc0e75 100644 --- a/g4f/Provider/Geekgpt.py +++ b/g4f/Provider/Geekgpt.py @@ -21,12 +21,12 @@ class GeekGpt(BaseProvider): json_data = { 'messages': messages, - 'model': model, - 'temperature': kwargs.get('temperature', 0.9), - 'presence_penalty': kwargs.get('presence_penalty', 0), - 'top_p': kwargs.get('top_p', 1), - 'frequency_penalty': kwargs.get('frequency_penalty', 0), - 'stream': True + 'model': model, + 'temperature': kwargs.get('temperature', 0.9), + 'presence_penalty': kwargs.get('presence_penalty', 0), + 'top_p': kwargs.get('top_p', 1), + 'frequency_penalty': kwargs.get('frequency_penalty', 0), + 'stream': True } data = dumps(json_data, separators=(',', ':')) @@ -61,7 +61,6 @@ class GeekGpt(BaseProvider): try: content = json.loads(json_data)["choices"][0]["delta"].get("content") - except Exception as e: raise RuntimeError(f'error | {e} :', json_data) |