diff --git a/app/routes/messages.py b/app/routes/messages.py index 08f28d56..46f03c89 100644 --- a/app/routes/messages.py +++ b/app/routes/messages.py @@ -75,7 +75,9 @@ def send_message(body: SendMessageRequest) -> SendMessageResponse: content=[ Content( type=ContentType.TEXT, - textContent=generated_vars["response"], # V1 behavior: only return the 'response' variable + textContent=generated_vars[ + "response" + ], # V1 behavior: only return the 'response' variable ) ], ), diff --git a/tests/routes/messages_test.py b/tests/routes/messages_test.py index b3b98368..3d5ba218 100644 --- a/tests/routes/messages_test.py +++ b/tests/routes/messages_test.py @@ -50,7 +50,9 @@ def test_send_message(test_client, headers, mocker): "query": "Some query", }, } - response_v1 = test_client.post("/api/v1/messages", headers=headers, json=body) + response_v1 = test_client.post( + "/api/v1/messages", headers=headers, json=body + ) assert response_v1.status_code == 200 assert response_v1.json() == { "usedModel": "GPT35_TURBO", @@ -60,7 +62,9 @@ def test_send_message(test_client, headers, mocker): }, } - response_v2 = test_client.post("/api/v2/messages", headers=headers, json=body) + response_v2 = test_client.post( + "/api/v2/messages", headers=headers, json=body + ) assert response_v2.status_code == 200 assert response_v2.json() == { "usedModel": "GPT35_TURBO",