Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/anthropic-sdk-python
/ chat_message
Function
chat_message
tests/test_open_telemetry.py:295–296 ·
view source on GitHub ↗
(role: str, *parts: dict[str, Any])
Source
from the content-addressed store, hash-verified
293
294
295
def
chat_message(role: str, *parts: dict[str, Any]) -> dict[str, Any]:
296
return
{
"role"
: role,
"parts"
: list(parts)}
297
298
299
SIZE_BOUND_CASES = [
Callers
4
test_open_telemetry.py
File · 0.85
test_size_bound_counts_bytes_not_characters
Method · 0.85
test_stop_sequences_are_measured_in_bytes
Method · 0.85
test_parts_and_the_cut_of_the_last_text_part_are_measured_in_bytes
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected