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 )