MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / logged_options

Function logged_options

tests/test_prepare.py:506–509  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

504 caplog.set_level(logging.DEBUG, logger="anthropic._base_client")
505
506 def logged_options() -> str:
507 [message] = [m for m in (r.getMessage() for r in caplog.records) if m.startswith("Request options:")]
508 caplog.clear()
509 return message
510
511 # so the logged request options, dumped with `exclude_unset`, only name them when there are any
512 await send({"a": 1})

Calls

no outgoing calls

Tested by

no test coverage detected