summaryrefslogtreecommitdiffstats
path: root/g4f/Provider
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/Provider/retry_provider.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/g4f/Provider/retry_provider.py b/g4f/Provider/retry_provider.py
index 4ecfaffb..ee342315 100644
--- a/g4f/Provider/retry_provider.py
+++ b/g4f/Provider/retry_provider.py
@@ -41,11 +41,14 @@ class RetryProvider(AsyncProvider):
try:
if self.logging:
print(f"Using {provider.__name__} provider")
+
for token in provider.create_completion(model, messages, stream, **kwargs):
yield token
started = True
+
if started:
return
+
except Exception as e:
self.exceptions[provider.__name__] = e
if self.logging: