Skip to content

Commit

Permalink
Cache seed usage log changed from info to debug level (#1042)
Browse files Browse the repository at this point in the history
  • Loading branch information
davorrunje authored Feb 19, 2025
1 parent f823662 commit baac4a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion autogen/oai/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@

@lru_cache(maxsize=128)
def log_cache_seed_value(cache_seed_value: Union[str, int], client: "ModelClient") -> None:
logger.info(f"Using cache with seed value {cache_seed_value} for client {client.__class__.__name__}")
logger.debug(f"Using cache with seed value {cache_seed_value} for client {client.__class__.__name__}")


@export_module("autogen")
Expand Down
4 changes: 2 additions & 2 deletions test/oai/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ def test_log_cache_seed_value(mock_credentials: Credentials, monkeypatch: pytest
wrapper = OpenAIWrapper(config_list=mock_credentials.config_list)
_ = wrapper.create(messages=[{"role": "user", "content": prompt}], cache_seed=999)

mock_logger.info.assert_called_once()
actual = mock_logger.info.call_args[0][0]
mock_logger.debug.assert_called_once()
actual = mock_logger.debug.call_args[0][0]
expected = "Using cache with seed value 999 for client OpenAIClient"
assert actual == expected, f"Expected: {expected}, Actual: {actual}"

Expand Down

0 comments on commit baac4a8

Please sign in to comment.