From 063696630ccc01bb17bc2f75492fb4ea935076dc Mon Sep 17 00:00:00 2001 From: abc <98614666+xtekky@users.noreply.github.com> Date: Mon, 20 Nov 2023 19:00:56 +0000 Subject: ~ | g4f v-0.1.8.9 --- g4f/Provider/base_provider.py | 16 ++++++++++------ g4f/__init__.py | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'g4f') 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 diff --git a/g4f/__init__.py b/g4f/__init__.py index 2c9ef7d7..11081611 100644 --- a/g4f/__init__.py +++ b/g4f/__init__.py @@ -5,7 +5,7 @@ from .Provider import BaseProvider, AsyncGeneratorProvider, RetryProvider from .typing import Messages, CreateResult, AsyncResult, Union, List from . import debug -version = '0.1.8.7' +version = '0.1.8.9' version_check = True def check_pypi_version() -> None: -- cgit v1.2.3