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

Function message

tests/lib/test_refusal_fallback.py:40–54  ·  view source on GitHub ↗
(model: str, **overrides: Any)

Source from the content-addressed store, hash-verified

38
39
40def message(model: str, **overrides: Any) -> httpx.Response:
41 return httpx.Response(
42 200,
43 json={
44 "id": "msg_1",
45 "type": "message",
46 "role": "assistant",
47 "model": model,
48 "content": [],
49 "stop_reason": "end_turn",
50 "stop_sequence": None,
51 "usage": {"input_tokens": 1, "output_tokens": 1},
52 **overrides,
53 },
54 )
55
56
57def refusal(model: str, fallback_credit_token: str | None = None) -> httpx.Response:

Calls

no outgoing calls

Tested by

no test coverage detected