summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--py/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/utils.py b/py/utils.py
index d3b7c8d..264c0c4 100644
--- a/py/utils.py
+++ b/py/utils.py
@@ -204,7 +204,8 @@ def printDebug(text, *args):
if not is_debugging:
return
with open(debug_log_file, "a") as file:
- file.write(f"[{datetime.datetime.now()}] " + text.format(*args) + "\n")
+ message = text.format(*args) if len(args) else text
+ file.write(f"[{datetime.datetime.now()}] " + message + "\n")
OPENAI_RESP_DATA_PREFIX = 'data: '
OPENAI_RESP_DONE = '[DONE]'