diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-01-01 17:48:57 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-01-01 17:48:57 +0100 |
commit | c617b18d12c2f9d82ce7c73aae46d353b83f625a (patch) | |
tree | 898f5090865a8aea64fb87e56f9ebfc979a6b706 /g4f/Provider/deprecated/Aivvm.py | |
parent | Patch event loop on win, Check event loop closed (diff) | |
download | gpt4free-c617b18d12c2f9d82ce7c73aae46d353b83f625a.tar gpt4free-c617b18d12c2f9d82ce7c73aae46d353b83f625a.tar.gz gpt4free-c617b18d12c2f9d82ce7c73aae46d353b83f625a.tar.bz2 gpt4free-c617b18d12c2f9d82ce7c73aae46d353b83f625a.tar.lz gpt4free-c617b18d12c2f9d82ce7c73aae46d353b83f625a.tar.xz gpt4free-c617b18d12c2f9d82ce7c73aae46d353b83f625a.tar.zst gpt4free-c617b18d12c2f9d82ce7c73aae46d353b83f625a.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/Provider/deprecated/Aivvm.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/g4f/Provider/deprecated/Aivvm.py b/g4f/Provider/deprecated/Aivvm.py index 8b5a9e05..c973adf8 100644 --- a/g4f/Provider/deprecated/Aivvm.py +++ b/g4f/Provider/deprecated/Aivvm.py @@ -1,9 +1,10 @@ from __future__ import annotations + import requests +import json -from ..base_provider import BaseProvider +from ..base_provider import AbstractProvider from ...typing import CreateResult, Messages -from json import dumps # to recreate this easily, send a post request to https://chat.aivvm.com/api/models models = { @@ -17,7 +18,7 @@ models = { 'gpt-4-32k-0613': {'id': 'gpt-4-32k-0613', 'name': 'GPT-4-32K-0613'}, } -class Aivvm(BaseProvider): +class Aivvm(AbstractProvider): url = 'https://chat.aivvm.com' supports_stream = True working = False @@ -44,7 +45,7 @@ class Aivvm(BaseProvider): "temperature" : kwargs.get("temperature", 0.7) } - data = dumps(json_data) + data = json.dumps(json_data) headers = { "accept" : "text/event-stream", |