將此提示複製到我們的開發者控制台中,親自試試看!

角色內容
User幫我創建一些比喻來描述一個人歡樂且具有感染力的笑聲?

範例輸出

  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-opus-4-20250514",
  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)