将此提示复制到我们的开发者控制台中亲自试用!
角色内容
用户帮我创造一些比喻来描述一个人快乐且具有感染力的笑声?

示例输出

  1. 他的笑声像刚开启的香槟酒瓶一样冒泡,充满活力和生命力。
  2. 他们的笑声像寒冷夜晚中温暖舒适的壁炉一样温暖诱人,吸引人们加入欢乐之中。

API 请求

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=1,
  messages=[
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "Help me create some similes to describe a person's laughter that is joyful and contagious?"
        }
      ]
    }
  ]
)
print(message.content)