From 5f9d7b78c680b40cf5218c2d32829ece4ca18c20 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Tue, 19 Mar 2024 18:52:17 +0100 Subject: Fix Bing key error --- g4f/Provider/Bing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/g4f/Provider/Bing.py b/g4f/Provider/Bing.py index 0a0d2634..a1d14d87 100644 --- a/g4f/Provider/Bing.py +++ b/g4f/Provider/Bing.py @@ -293,7 +293,7 @@ def create_message( :return: A formatted string message for the Bing API. """ - options_sets = Defaults.optionsSets[tone] + options_sets = Defaults.optionsSets[tone.lower()] if not web_search and "nosearch" in options_sets: options_sets = options_sets["nosearch"] elif "default" in options_sets: @@ -308,7 +308,7 @@ def create_message( "source": "cib", "optionsSets": options_sets, "allowedMessageTypes": Defaults.allowedMessageTypes, - "sliceIds": Defaults.sliceIds[tone], + "sliceIds": Defaults.sliceIds[tone.lower()], "verbosity": "verbose", "scenario": "CopilotMicrosoftCom" if tone == Tones.copilot else "SERP", "plugins": [{"id": "c310c353-b9f0-4d76-ab0d-1dd5e979cf68", "category": 1}] if web_search else [], -- cgit v1.2.3