diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-02-23 03:08:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 03:08:30 +0100 |
commit | cf87d467c927d4b93916a42e7139f4e801172d62 (patch) | |
tree | 175b39f8486ce72be00a40cc345834abe859c84c /g4f/providers/types.py | |
parent | ~ (diff) | |
parent | Fix unittests, use Union typing (diff) | |
download | gpt4free-cf87d467c927d4b93916a42e7139f4e801172d62.tar gpt4free-cf87d467c927d4b93916a42e7139f4e801172d62.tar.gz gpt4free-cf87d467c927d4b93916a42e7139f4e801172d62.tar.bz2 gpt4free-cf87d467c927d4b93916a42e7139f4e801172d62.tar.lz gpt4free-cf87d467c927d4b93916a42e7139f4e801172d62.tar.xz gpt4free-cf87d467c927d4b93916a42e7139f4e801172d62.tar.zst gpt4free-cf87d467c927d4b93916a42e7139f4e801172d62.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/providers/types.py (renamed from g4f/base_provider.py) | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/g4f/base_provider.py b/g4f/providers/types.py index cc3451a2..7b11ec43 100644 --- a/g4f/base_provider.py +++ b/g4f/providers/types.py @@ -2,7 +2,7 @@ from __future__ import annotations from abc import ABC, abstractmethod from typing import Union, List, Dict, Type -from .typing import Messages, CreateResult +from ..typing import Messages, CreateResult class BaseProvider(ABC): """ @@ -81,7 +81,7 @@ class BaseProvider(ABC): Dict[str, str]: A dictionary with provider's details. """ return {'name': cls.__name__, 'url': cls.url} - + class BaseRetryProvider(BaseProvider): """ Base class for a provider that implements retry logic. @@ -113,5 +113,5 @@ class BaseRetryProvider(BaseProvider): self.working = True self.exceptions: Dict[str, Exception] = {} self.last_provider: Type[BaseProvider] = None - + ProviderType = Union[Type[BaseProvider], BaseRetryProvider]
\ No newline at end of file |