diff options
Diffstat (limited to '')
-rw-r--r-- | g4f/client/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/g4f/client/__init__.py b/g4f/client/__init__.py index dea19a60..38269cf6 100644 --- a/g4f/client/__init__.py +++ b/g4f/client/__init__.py @@ -13,7 +13,7 @@ from ..providers.base_provider import AsyncGeneratorProvider from ..image import ImageResponse, copy_images, images_dir from ..typing import Messages, Image, ImageType from ..providers.types import ProviderType -from ..providers.response import ResponseType, FinishReason, BaseConversation +from ..providers.response import ResponseType, FinishReason, BaseConversation, SynthesizeData from ..errors import NoImageResponseError, ModelNotFoundError from ..providers.retry_provider import IterListProvider from ..providers.base_provider import get_running_loop @@ -60,6 +60,8 @@ def iter_response( elif isinstance(chunk, BaseConversation): yield chunk continue + elif isinstance(chunk, SynthesizeData): + continue chunk = str(chunk) content += chunk @@ -121,6 +123,8 @@ async def async_iter_response( elif isinstance(chunk, BaseConversation): yield chunk continue + elif isinstance(chunk, SynthesizeData): + continue chunk = str(chunk) content += chunk |