import anthropic
client = anthropic.Anthropic(
# defaults to os.environ.get("ANTHROPIC_API_KEY")
api_key="my_api_key",
)
message = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=1000,
temperature=0,
system="精确复制以下文本中的任何邮箱地址,然后逐行写出。只有在输入文本中精确拼写出邮箱地址时才写出邮箱地址。如果文本中没有邮箱地址,请写\"N/A\"。不要说其他任何内容。",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "电话目录: \nJohn Latrabe,555-232-1995,[[email protected]] \nJosie Lana,555-759-2905,[[email protected]] \nKeven Stevens,555-980-7000,[[email protected]] \n \n电话目录将由HR经理保持更新。"
}
]
}
]
)
print(message.content)