mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-09-11 16:55:41 +03:00
Update async_client.py
This commit is contained in:
parent
738e532c5d
commit
370ac53943
@ -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}],
|
||||
|
Loading…
Reference in New Issue
Block a user