summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/BingCreateImages.py
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-03-11 07:47:35 +0100
committerGitHub <noreply@github.com>2024-03-11 07:47:35 +0100
commit0b850ac9fcabc52fecdeea8d56e620e44b35d180 (patch)
treef92578686f34476be49422889d4587d8f3cf2fa6 /g4f/Provider/BingCreateImages.py
parentMerge pull request #1670 from xtekky/xtekky-patch-1 (diff)
parentFix HuggingChat and PerplexityLabs and add HuggingFace provider (diff)
downloadgpt4free-0b850ac9fcabc52fecdeea8d56e620e44b35d180.tar
gpt4free-0b850ac9fcabc52fecdeea8d56e620e44b35d180.tar.gz
gpt4free-0b850ac9fcabc52fecdeea8d56e620e44b35d180.tar.bz2
gpt4free-0b850ac9fcabc52fecdeea8d56e620e44b35d180.tar.lz
gpt4free-0b850ac9fcabc52fecdeea8d56e620e44b35d180.tar.xz
gpt4free-0b850ac9fcabc52fecdeea8d56e620e44b35d180.tar.zst
gpt4free-0b850ac9fcabc52fecdeea8d56e620e44b35d180.zip
Diffstat (limited to 'g4f/Provider/BingCreateImages.py')
-rw-r--r--g4f/Provider/BingCreateImages.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/Provider/BingCreateImages.py b/g4f/Provider/BingCreateImages.py
index 901b7787..c465c1d8 100644
--- a/g4f/Provider/BingCreateImages.py
+++ b/g4f/Provider/BingCreateImages.py
@@ -2,7 +2,7 @@ from __future__ import annotations
import asyncio
import os
-from typing import Generator
+from typing import Iterator, Union
from ..cookies import get_cookies
from ..image import ImageResponse
@@ -16,7 +16,7 @@ class BingCreateImages:
self.cookies = cookies
self.proxy = proxy
- def create(self, prompt: str) -> Generator[ImageResponse, None, None]:
+ def create(self, prompt: str) -> Iterator[Union[ImageResponse, str]]:
"""
Generator for creating imagecompletion based on a prompt.