mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
Logging: Add newlines to Prompt and Response
Makes things clearer rather than adding an extra space. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -56,10 +56,12 @@ def log_generation_params(**kwargs):
|
||||
def log_prompt(prompt: str):
|
||||
"""Logs the prompt to console."""
|
||||
if CONFIG.prompt:
|
||||
logger.info(f"Prompt: {prompt if prompt else 'Empty'}\n")
|
||||
formatted_prompt = "\n" + prompt
|
||||
logger.info(f"Prompt: {formatted_prompt if prompt else 'Empty'}\n")
|
||||
|
||||
|
||||
def log_response(response: str):
|
||||
"""Logs the response to console."""
|
||||
if CONFIG.prompt:
|
||||
logger.info(f"Response: {response if response else 'Empty'}\n")
|
||||
formatted_response = "\n" + response
|
||||
logger.info(f"Response: {formatted_response if response else 'Empty'}\n")
|
||||
|
||||
Reference in New Issue
Block a user