From fd97cceab0727e0e97e15c45c5b7ba979e143562 Mon Sep 17 00:00:00 2001 From: hlohaus <983577+hlohaus@users.noreply.github.com> Date: Fri, 24 Jan 2025 04:56:26 +0100 Subject: Restore AsyncClient streaming return type Improve error handling in DDG use OpenaiAPI provider in DeepInfraChat Support api_base and response_type parameters in API --- g4f/errors.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'g4f/errors.py') diff --git a/g4f/errors.py b/g4f/errors.py index 48dda8a5..e6bcd407 100644 --- a/g4f/errors.py +++ b/g4f/errors.py @@ -47,4 +47,10 @@ class RateLimitError(ResponseStatusError): ... class NoValidHarFileError(Exception): - ... \ No newline at end of file + ... + +class TimeoutError(Exception): + """Raised for timeout errors during API requests.""" + +class ConversationLimitError(Exception): + """Raised for conversation limit during API requests to AI endpoint.""" \ No newline at end of file -- cgit v1.2.3