summaryrefslogtreecommitdiffstats
path: root/g4f/Provider
diff options
context:
space:
mode:
authorabc <98614666+xtekky@users.noreply.github.com>2023-10-20 20:28:46 +0200
committerabc <98614666+xtekky@users.noreply.github.com>2023-10-20 20:28:46 +0200
commitdad69d24ce0d56b291a1cd5aebeeefd60aa8c3fa (patch)
treeaf8bf2f3b25eebb2ec3c729e3f878b7ed9fc5970 /g4f/Provider
parent~ | quick fix (diff)
downloadgpt4free-dad69d24ce0d56b291a1cd5aebeeefd60aa8c3fa.tar
gpt4free-dad69d24ce0d56b291a1cd5aebeeefd60aa8c3fa.tar.gz
gpt4free-dad69d24ce0d56b291a1cd5aebeeefd60aa8c3fa.tar.bz2
gpt4free-dad69d24ce0d56b291a1cd5aebeeefd60aa8c3fa.tar.lz
gpt4free-dad69d24ce0d56b291a1cd5aebeeefd60aa8c3fa.tar.xz
gpt4free-dad69d24ce0d56b291a1cd5aebeeefd60aa8c3fa.tar.zst
gpt4free-dad69d24ce0d56b291a1cd5aebeeefd60aa8c3fa.zip
Diffstat (limited to 'g4f/Provider')
-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: