From dad69d24ce0d56b291a1cd5aebeeefd60aa8c3fa Mon Sep 17 00:00:00 2001 From: abc <98614666+xtekky@users.noreply.github.com> Date: Fri, 20 Oct 2023 19:28:46 +0100 Subject: ~ minor changes --- g4f/Provider/retry_provider.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'g4f/Provider') 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: -- cgit v1.2.3