diff options
author | abc <98614666+xtekky@users.noreply.github.com> | 2023-11-20 20:00:56 +0100 |
---|---|---|
committer | abc <98614666+xtekky@users.noreply.github.com> | 2023-11-20 20:00:56 +0100 |
commit | 063696630ccc01bb17bc2f75492fb4ea935076dc (patch) | |
tree | 57091ac9b8285c5782e50dda6560c5d7377c28a9 /g4f/Provider | |
parent | ~ | improve compatibility (diff) | |
download | gpt4free-063696630ccc01bb17bc2f75492fb4ea935076dc.tar gpt4free-063696630ccc01bb17bc2f75492fb4ea935076dc.tar.gz gpt4free-063696630ccc01bb17bc2f75492fb4ea935076dc.tar.bz2 gpt4free-063696630ccc01bb17bc2f75492fb4ea935076dc.tar.lz gpt4free-063696630ccc01bb17bc2f75492fb4ea935076dc.tar.xz gpt4free-063696630ccc01bb17bc2f75492fb4ea935076dc.tar.zst gpt4free-063696630ccc01bb17bc2f75492fb4ea935076dc.zip |
Diffstat (limited to 'g4f/Provider')
-rw-r--r-- | g4f/Provider/base_provider.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/g4f/Provider/base_provider.py b/g4f/Provider/base_provider.py index 564dd77e..1b0771ff 100644 --- a/g4f/Provider/base_provider.py +++ b/g4f/Provider/base_provider.py @@ -1,14 +1,18 @@ from __future__ import annotations -from asyncio import AbstractEventLoop +import sys +from asyncio import AbstractEventLoop from concurrent.futures import ThreadPoolExecutor -from abc import ABC, abstractmethod -from inspect import signature, Parameter -from types import NoneType +from abc import ABC, abstractmethod +from inspect import signature, Parameter +from .helper import get_event_loop, get_cookies, format_prompt +from ..typing import CreateResult, AsyncResult, Messages -from .helper import get_event_loop, get_cookies, format_prompt -from ..typing import CreateResult, AsyncResult, Messages +if sys.version_info < (3, 10): + NoneType = type(None) +else: + from types import NoneType class BaseProvider(ABC): url: str |