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

Function async_client

examples/vertex.py:29–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28
29async def async_client() -> None:
30 print("------ Async Vertex ------")
31
32 client = AsyncAnthropicVertex()
33
34 message = await client.messages.create(
35 model="claude-sonnet-5",
36 max_tokens=1024,
37 messages=[
38 {
39 "role": "user",
40 "content": "Hello!",
41 }
42 ],
43 )
44 print(message.to_json())
45
46
47sync_client()

Callers 1

vertex.pyFile · 0.70

Calls 3

to_jsonMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected