From d13bf7e4ec8921b31f1a513a5c90a859d2bfd48b Mon Sep 17 00:00:00 2001 From: monst Date: Fri, 13 Oct 2023 14:16:31 +0200 Subject: [PATCH] Shorten long lines --- app/routes/messages.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/routes/messages.py b/app/routes/messages.py index 46f03c89..baa65d70 100644 --- a/app/routes/messages.py +++ b/app/routes/messages.py @@ -62,7 +62,7 @@ def execute_call(body: SendMessageRequest) -> dict: def send_message(body: SendMessageRequest) -> SendMessageResponse: generated_vars = execute_call(body) - # Restore the old behavior of throwing an exception if no 'response' variable was generated + # V1: Throw an exception if no 'response' variable was generated if "response" not in generated_vars: raise InternalServerException( str(ValueError("The handlebars do not generate 'response'")) @@ -77,7 +77,7 @@ def send_message(body: SendMessageRequest) -> SendMessageResponse: type=ContentType.TEXT, textContent=generated_vars[ "response" - ], # V1 behavior: only return the 'response' variable + ], # V1: only return the 'response' variable ) ], ), @@ -93,5 +93,5 @@ def send_message_v2(body: SendMessageRequest) -> SendMessageResponseV2: return SendMessageResponseV2( usedModel=body.preferred_model, sentAt=datetime.now(timezone.utc), - content=generated_vars, # V2 behavior: return all variables generated in the program + content=generated_vars, # V2: return all generated variables )