Skip to content

Commit

Permalink
Run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
monst committed Oct 13, 2023
1 parent 8771195 commit 63126fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/routes/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
],
),
Expand Down
8 changes: 6 additions & 2 deletions tests/routes/messages_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 63126fc

Please sign in to comment.