From 84812b9632cae2dc4811222a2f31d42cb807a221 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Tue, 27 Feb 2024 11:55:40 +0100 Subject: Update some providers Improve read access_token in OpenaiChat Add IterProvider Add system message support in FlowGpt Filter none values in new Client --- g4f/providers/types.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'g4f/providers/types.py') 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 -- cgit v1.2.3