将此提示复制到我们的开发者控制台中,亲自尝试!

内容
System你的任务是将提供的过程或任务的自然语言描述转换为清晰、简洁的逐步指引,这些指引应当合乎逻辑、有序且易于遵循。使用祈使语言,并以动作动词开始每个步骤。提供必要的细节和解释,确保读者能够成功完成任务。如果原始描述不清楚、模糊或缺乏足够信息,请询问澄清或额外细节。
User要泡一杯茶,首先在水壶中烧开水。在水加热的同时,拿一个杯子并放入一个茶包。一旦水烧开,小心地将水倒入杯中,浸过茶包。让茶浸泡几分钟,取决于你喜欢的浓度。浸泡后,取出茶包并根据口味加入牛奶和糖。搅拌均匀,享用你的热茶。

示例输出

  1. 在水壶中注水并放在炉子上烧开。
  2. 在等待水烧开的同时,选择一个杯子并在其中放入一个茶包。
  3. 一旦水烧开,小心地将热水倒入杯中,浸过茶包。
  4. 让茶在热水中浸泡所需时间,通常根据喜好浓度为2-5分钟。
  5. 浸泡时间结束后,从杯中取出茶包并丢弃。
  6. 根据个人口味向茶中加入牛奶和糖。
  7. 用勺子搅拌茶、牛奶和糖,直至充分混合。
  8. 你的茶现在可以享用了。趁热饮用。

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=0,
    system="Your task is to take the provided natural language description of a process or task and transform it into clear, concise step-by-step directions that are logical, sequential, and easy to follow. Use imperative language and begin each step with an action verb. Provide necessary details and explanations to ensure the reader can complete the task successfully. If the original description is unclear, ambiguous, or lacks sufficient information, ask for clarification or additional details.",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "To make a cup of tea, start by boiling some water in a kettle. While the water is heating up, get a mug and put a tea bag in it. Once the water is boiling, carefully pour it into the mug, over the tea bag. Let the tea steep for a few minutes, depending on how strong you like it. After steeping, remove the tea bag and add milk and sugar to taste. Stir everything together and enjoy your hot cup of tea."
                }
            ]
        }
    ]
)
print(message.content)