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

Function refusal

tests/lib/test_refusal_fallback.py:57–67  ·  view source on GitHub ↗
(model: str, fallback_credit_token: str | None = None)

Source from the content-addressed store, hash-verified

55
56
57def refusal(model: str, fallback_credit_token: str | None = None) -> httpx.Response:
58 return message(
59 model,
60 stop_reason="refusal",
61 stop_details={
62 "type": "refusal",
63 "category": None,
64 "explanation": None,
65 "fallback_credit_token": fallback_credit_token,
66 },
67 )
68
69
70class MockRequestCall(Protocol):

Calls 1

messageFunction · 0.85

Tested by

no test coverage detected