Skip to content

Commit

Permalink
fix: ignore assembled_response for endpoints other than `/chat/comp…
Browse files Browse the repository at this point in the history
…letions` (#110)
  • Loading branch information
adubovik authored Feb 20, 2025
1 parent 6aa91d3 commit 55b74ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aidial_analytics_realtime/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ async def on_log_message(
parent_deployment = message.get("parent_deployment")
execution_path = message.get("execution_path")
deployment = message.get("deployment") or ""
response_body = get_assembled_response(message)

if re.search(RATE_PATTERN, uri):
await on_rate_message(
Expand All @@ -225,6 +224,7 @@ async def on_log_message(
)

elif re.search(CHAT_COMPLETION_PATTERN, uri):
response_body = get_assembled_response(message)
await on_chat_completion_message(
deployment,
project_id,
Expand Down
1 change: 1 addition & 0 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ def test_rate_request():
}
),
},
"assembled_response": "",
"response": {
"status": "200",
"body": "",
Expand Down

0 comments on commit 55b74ba

Please sign in to comment.