From 5ec0302e19ae9d9a1f94b7b90dec9ba1f44659ed Mon Sep 17 00:00:00 2001 From: manatlan Date: Fri, 15 Nov 2024 10:10:04 +0100 Subject: FIX: fix the url in the markdown output (md compliance), and the chunk/ImageResponse to str ! (#2353) add fix_url ( replace ' ' by '+' (to be markdown compliant)) --- g4f/providers/base_provider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'g4f/providers/base_provider.py') diff --git a/g4f/providers/base_provider.py b/g4f/providers/base_provider.py index a03dcbba..5d48f2e0 100644 --- a/g4f/providers/base_provider.py +++ b/g4f/providers/base_provider.py @@ -248,7 +248,7 @@ class AsyncGeneratorProvider(AsyncProvider): str: The created result as a string. """ return "".join([ - chunk async for chunk in cls.create_async_generator(model, messages, stream=False, **kwargs) + str(chunk) async for chunk in cls.create_async_generator(model, messages, stream=False, **kwargs) if not isinstance(chunk, (Exception, FinishReason)) ]) -- cgit v1.2.3