Skip to content

Commit

Permalink
Update PerplexityLabs.py
Browse files Browse the repository at this point in the history
fixed GeneratorExit exception
  • Loading branch information
Parthsadaria authored Feb 2, 2025
1 parent 370d904 commit d0e80e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions g4f/Provider/PerplexityLabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,6 @@ async def create_async_generator(
if data["final"]:
yield FinishReason("stop")
break
except:
raise RuntimeError(f"Message: {message}")
except Exception as e:
print(f"Error processing message: {message} - {e}")
raise RuntimeError(f"Message: {message}") from e

0 comments on commit d0e80e5

Please sign in to comment.