summaryrefslogtreecommitdiffstats
path: root/g4f/debug.py
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-11-19 15:57:16 +0100
committerGitHub <noreply@github.com>2024-11-19 15:57:16 +0100
commit1563946aa2757baad48ff05732356f78e82dd4e6 (patch)
tree0481d391ff397c7d4be93a7224c3717e03ae2b3f /g4f/debug.py
parentMerge pull request #2378 from hlohaus/info (diff)
parentAdd show log option to gui (diff)
downloadgpt4free-1563946aa2757baad48ff05732356f78e82dd4e6.tar
gpt4free-1563946aa2757baad48ff05732356f78e82dd4e6.tar.gz
gpt4free-1563946aa2757baad48ff05732356f78e82dd4e6.tar.bz2
gpt4free-1563946aa2757baad48ff05732356f78e82dd4e6.tar.lz
gpt4free-1563946aa2757baad48ff05732356f78e82dd4e6.tar.xz
gpt4free-1563946aa2757baad48ff05732356f78e82dd4e6.tar.zst
gpt4free-1563946aa2757baad48ff05732356f78e82dd4e6.zip
Diffstat (limited to 'g4f/debug.py')
-rw-r--r--g4f/debug.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/g4f/debug.py b/g4f/debug.py
index 3f08e9e8..f8085add 100644
--- a/g4f/debug.py
+++ b/g4f/debug.py
@@ -4,4 +4,9 @@ logging: bool = False
version_check: bool = True
last_provider: ProviderType = None
last_model: str = None
-version: str = None \ No newline at end of file
+version: str = None
+log_handler: callable = print
+
+def log(text):
+ if logging:
+ log_handler(text) \ No newline at end of file