summaryrefslogtreecommitdiffstats
path: root/g4f/client/async_client.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/client/async_client.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/g4f/client/async_client.py b/g4f/client/async_client.py
index 1508e566..9849c565 100644
--- a/g4f/client/async_client.py
+++ b/g4f/client/async_client.py
@@ -183,9 +183,10 @@ async def iter_image_response(
return ImagesResponse([Image(None, image, chunk.alt) for image in chunk.get_list()], int(time.time()))
def create_image(provider: ProviderType, prompt: str, model: str = "", **kwargs) -> AsyncIterator:
- prompt = f"create a image with: {prompt}"
- if provider.__name__ == "You":
+ if isinstance(provider, type) and provider.__name__ == "You":
kwargs["chat_mode"] = "create"
+ else:
+ prompt = f"create a image with: {prompt}"
return provider.create_async_generator(
model,
[{"role": "user", "content": prompt}],