summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Copilot.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-11-19 15:26:03 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-11-19 15:26:03 +0100
commit8f3fbee0d8a4ca69af72dae989ae8954181d0108 (patch)
tree0481d391ff397c7d4be93a7224c3717e03ae2b3f /g4f/Provider/Copilot.py
parentFix generate messages on error in gui (diff)
downloadgpt4free-8f3fbee0d8a4ca69af72dae989ae8954181d0108.tar
gpt4free-8f3fbee0d8a4ca69af72dae989ae8954181d0108.tar.gz
gpt4free-8f3fbee0d8a4ca69af72dae989ae8954181d0108.tar.bz2
gpt4free-8f3fbee0d8a4ca69af72dae989ae8954181d0108.tar.lz
gpt4free-8f3fbee0d8a4ca69af72dae989ae8954181d0108.tar.xz
gpt4free-8f3fbee0d8a4ca69af72dae989ae8954181d0108.tar.zst
gpt4free-8f3fbee0d8a4ca69af72dae989ae8954181d0108.zip
Diffstat (limited to 'g4f/Provider/Copilot.py')
-rw-r--r--g4f/Provider/Copilot.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/g4f/Provider/Copilot.py b/g4f/Provider/Copilot.py
index 6e64c714..c79f028d 100644
--- a/g4f/Provider/Copilot.py
+++ b/g4f/Provider/Copilot.py
@@ -93,13 +93,11 @@ class Copilot(AbstractProvider):
if return_conversation:
yield Conversation(conversation_id, session.cookies.jar, access_token)
prompt = format_prompt(messages)
- if debug.logging:
- print(f"Copilot: Created conversation: {conversation_id}")
+ debug.log(f"Copilot: Created conversation: {conversation_id}")
else:
conversation_id = conversation.conversation_id
prompt = messages[-1]["content"]
- if debug.logging:
- print(f"Copilot: Use conversation: {conversation_id}")
+ debug.log(f"Copilot: Use conversation: {conversation_id}")
images = []
if image is not None:
@@ -143,8 +141,7 @@ class Copilot(AbstractProvider):
if not has_nodriver:
raise MissingRequirementsError('Install "nodriver" package | pip install -U nodriver')
user_data_dir = user_config_dir("g4f-nodriver") if has_platformdirs else None
- if debug.logging:
- print(f"Copilot: Open nodriver with user_dir: {user_data_dir}")
+ debug.log(f"Copilot: Open nodriver with user_dir: {user_data_dir}")
browser = await nodriver.start(
user_data_dir=user_data_dir,
browser_args=None if proxy is None else [f"--proxy-server={proxy}"],