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

Function sync_client

examples/vertex.py:11–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9
10
11def sync_client() -> None:
12 print("------ Sync Vertex ------")
13
14 client = AnthropicVertex()
15
16 message = client.messages.create(
17 model="claude-sonnet-5-5",
18 max_tokens=100,
19 messages=[
20 {
21 "role": "user",
22 "content": "Hello!",
23 }
24 ],
25 )
26 print(message.to_json())
27
28
29async def async_client() -> None:

Callers 1

vertex.pyFile · 0.70

Calls 3

AnthropicVertexClass · 0.90
to_jsonMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected