Skip to content

Commit

Permalink
bug fix: fix agent_logging test (microsoft#2036)
Browse files Browse the repository at this point in the history
* fix test

* Update test/agentchat/test_agent_logging.py

---------

Co-authored-by: Chi Wang <[email protected]>
  • Loading branch information
cheng-tan and sonichi authored Mar 17, 2024
1 parent 7d61410 commit a433a94
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/agentchat/test_agent_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ def test_two_agents_logging(db_connection):
assert first_request_role == "system"

response = json.loads(row["response"])
assert "choices" in response and len(response["choices"]) > 0

if "response" in response: # config failed or response was empty
assert response["response"] is None or "error_code" in response["response"]
else:
assert "choices" in response and len(response["choices"]) > 0

assert row["cost"] > 0
assert row["start_time"], "start timestamp is empty"
Expand Down

0 comments on commit a433a94

Please sign in to comment.