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

Function _message

tests/lib/tools/toolsets/test_browser_runner.py:36–49  ·  view source on GitHub ↗
(*blocks: dict[str, Any], stop: str = "tool_use")

Source from the content-addressed store, hash-verified

34
35
36def _message(*blocks: dict[str, Any], stop: str = "tool_use") -> httpx2.Response:
37 return httpx2.Response(
38 200,
39 json={
40 "id": "msg_1",
41 "type": "message",
42 "role": "assistant",
43 "model": "claude-haiku-4-5",
44 "content": list(blocks),
45 "stop_reason": stop,
46 "stop_sequence": None,
47 "usage": {"input_tokens": 1, "output_tokens": 1},
48 },
49 )
50
51
52def _member_use(name: str, id: str, input: dict[str, Any]) -> dict[str, Any]:

Calls

no outgoing calls

Tested by

no test coverage detected