diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-02-27 11:55:40 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-02-27 11:55:40 +0100 |
commit | 84812b9632cae2dc4811222a2f31d42cb807a221 (patch) | |
tree | f7dda40a968be33ee87e78187a2bf41bb78cf973 /g4f/providers/types.py | |
parent | Add support for message history and system message in OpenaiChat (diff) | |
download | gpt4free-84812b9632cae2dc4811222a2f31d42cb807a221.tar gpt4free-84812b9632cae2dc4811222a2f31d42cb807a221.tar.gz gpt4free-84812b9632cae2dc4811222a2f31d42cb807a221.tar.bz2 gpt4free-84812b9632cae2dc4811222a2f31d42cb807a221.tar.lz gpt4free-84812b9632cae2dc4811222a2f31d42cb807a221.tar.xz gpt4free-84812b9632cae2dc4811222a2f31d42cb807a221.tar.zst gpt4free-84812b9632cae2dc4811222a2f31d42cb807a221.zip |
Diffstat (limited to 'g4f/providers/types.py')
-rw-r--r-- | g4f/providers/types.py | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/g4f/providers/types.py b/g4f/providers/types.py index 7b11ec43..50080a96 100644 --- a/g4f/providers/types.py +++ b/g4f/providers/types.py @@ -1,7 +1,7 @@ from __future__ import annotations from abc import ABC, abstractmethod -from typing import Union, List, Dict, Type +from typing import Union, Dict, Type from ..typing import Messages, CreateResult class BaseProvider(ABC): @@ -96,22 +96,4 @@ class BaseRetryProvider(BaseProvider): __name__: str = "RetryProvider" supports_stream: bool = True - def __init__( - self, - providers: List[Type[BaseProvider]], - shuffle: bool = True - ) -> None: - """ - Initialize the BaseRetryProvider. - - Args: - providers (List[Type[BaseProvider]]): List of providers to use. - shuffle (bool): Whether to shuffle the providers list. - """ - self.providers = providers - self.shuffle = shuffle - 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 |