summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Vercel.py
diff options
context:
space:
mode:
authorHeiner Lohaus <heiner@lohaus.eu>2023-10-22 08:57:31 +0200
committerHeiner Lohaus <heiner@lohaus.eu>2023-10-22 08:57:31 +0200
commit13e89d6ab9e3016741fdcbd03cc4996faec54f9a (patch)
treeff4b350e57dd8a77d8e7b41f85431bdb85118a4f /g4f/Provider/Vercel.py
parentAdd FakeGpt Provider (diff)
downloadgpt4free-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/Vercel.py')
-rw-r--r--g4f/Provider/Vercel.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/g4f/Provider/Vercel.py b/g4f/Provider/Vercel.py
index 10130320..7c3b8c55 100644
--- a/g4f/Provider/Vercel.py
+++ b/g4f/Provider/Vercel.py
@@ -4,7 +4,6 @@ import json, base64, requests, execjs, random, uuid
from ..typing import Messages, TypedDict, CreateResult, Any
from .base_provider import BaseProvider
-from abc import abstractmethod
from ..debug import logging
@@ -15,12 +14,13 @@ class Vercel(BaseProvider):
supports_stream = True
@staticmethod
- @abstractmethod
def create_completion(
model: str,
messages: Messages,
stream: bool,
- proxy: str = None, **kwargs) -> CreateResult:
+ proxy: str = None,
+ **kwargs
+ ) -> CreateResult:
if not model:
model = "gpt-3.5-turbo"
@@ -65,7 +65,7 @@ class Vercel(BaseProvider):
headers=headers, json=json_data, stream=True, proxies={"https": proxy})
try:
response.raise_for_status()
- except Exception:
+ except:
continue
for token in response.iter_content(chunk_size=None):
yield token.decode()