summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Bing.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-03-14 13:53:57 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-03-14 13:53:57 +0100
commit993c9498c4276836864b01f66f5d08676a994520 (patch)
tree9d0c3e2544669e09aacdcf635fec9095270c08bd /g4f/Provider/Bing.py
parentAdd model preselection in gui (diff)
downloadgpt4free-993c9498c4276836864b01f66f5d08676a994520.tar
gpt4free-993c9498c4276836864b01f66f5d08676a994520.tar.gz
gpt4free-993c9498c4276836864b01f66f5d08676a994520.tar.bz2
gpt4free-993c9498c4276836864b01f66f5d08676a994520.tar.lz
gpt4free-993c9498c4276836864b01f66f5d08676a994520.tar.xz
gpt4free-993c9498c4276836864b01f66f5d08676a994520.tar.zst
gpt4free-993c9498c4276836864b01f66f5d08676a994520.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/Bing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/g4f/Provider/Bing.py b/g4f/Provider/Bing.py
index e3e47af9..f8b13020 100644
--- a/g4f/Provider/Bing.py
+++ b/g4f/Provider/Bing.py
@@ -303,7 +303,7 @@ def create_message(
struct['arguments'][0]['previousMessages'] = [{
"author": "user",
"description": context,
- "contextType": "WebPage",
+ "contextType": "ClientApp",
"messageType": "Context",
"messageId": "discover-web--page-ping-mriduna-----"
}]
@@ -404,6 +404,8 @@ async def stream_generate(
image_client = BingCreateImages(cookies, proxy)
image_response = await image_client.create_async(prompt)
except Exception as e:
+ if debug.logging:
+ print(f"Bing: Failed to create images: {e}")
response_txt += f"\nhttps://www.bing.com/images/create?q={parse.quote(prompt)}"
do_read = False
if response_txt.startswith(returned_text):