summaryrefslogtreecommitdiffstats
path: root/g4f
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2023-12-07 14:30:55 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2023-12-07 14:30:55 +0100
commitbb34642fcb60c64f152bbc3210ccb85d32f1c947 (patch)
treec7d32de163cf90c004f3a217770ce370ea6b17b5 /g4f
parentAdd websearch to gui (#1314) (diff)
downloadgpt4free-bb34642fcb60c64f152bbc3210ccb85d32f1c947.tar
gpt4free-bb34642fcb60c64f152bbc3210ccb85d32f1c947.tar.gz
gpt4free-bb34642fcb60c64f152bbc3210ccb85d32f1c947.tar.bz2
gpt4free-bb34642fcb60c64f152bbc3210ccb85d32f1c947.tar.lz
gpt4free-bb34642fcb60c64f152bbc3210ccb85d32f1c947.tar.xz
gpt4free-bb34642fcb60c64f152bbc3210ccb85d32f1c947.tar.zst
gpt4free-bb34642fcb60c64f152bbc3210ccb85d32f1c947.zip
Diffstat (limited to 'g4f')
-rw-r--r--g4f/Provider/retry_provider.py2
-rw-r--r--g4f/gui/server/backend.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/g4f/Provider/retry_provider.py b/g4f/Provider/retry_provider.py
index 5979e15b..6fdefe0f 100644
--- a/g4f/Provider/retry_provider.py
+++ b/g4f/Provider/retry_provider.py
@@ -10,7 +10,6 @@ from .. import debug
class RetryProvider(AsyncProvider):
__name__: str = "RetryProvider"
- working: bool = True
supports_stream: bool = True
def __init__(
@@ -20,6 +19,7 @@ class RetryProvider(AsyncProvider):
) -> None:
self.providers: List[Type[BaseProvider]] = providers
self.shuffle: bool = shuffle
+ self.working = True
def create_completion(
self,
diff --git a/g4f/gui/server/backend.py b/g4f/gui/server/backend.py
index 082e31b2..b0c55c8a 100644
--- a/g4f/gui/server/backend.py
+++ b/g4f/gui/server/backend.py
@@ -1,4 +1,5 @@
import g4f
+from g4f.Provider import __providers__
from flask import request
from .internet import get_search_message
@@ -45,8 +46,7 @@ class Backend_Api:
def providers(self):
return [
- provider.__name__ for provider in g4f.Provider.__providers__
- if provider.working and provider is not g4f.Provider.RetryProvider
+ provider.__name__ for provider in __providers__ if provider.working
]
def version(self):