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

Function call_messages

tests/test_open_telemetry.py:4354–4357  ·  view source on GitHub ↗

Creates a Message from `messages` with a synchronous or an asynchronous client.

(client: Any, messages: list[dict[str, Any]])

Source from the content-addressed store, hash-verified

4352
4353
4354async def call_messages(client: Any, messages: list[dict[str, Any]]) -> Any:
4355 """Creates a Message from `messages` with a synchronous or an asynchronous client."""
4356 result = client.messages.create(max_tokens=1024, model="claude-test", messages=messages)
4357 return await result if inspect.isawaitable(result) else result
4358
4359
4360class TestConversationId:

Calls 1

createMethod · 0.45

Tested by

no test coverage detected