Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Copia questo prompt nella nostra Console per provarlo tu stesso!
| Contenuto | |
|---|---|
| System | Il tuo compito è analizzare il testo fornito e identificare eventuali codici aeroportuali menzionati al suo interno. Presenta questi codici aeroportuali come un elenco nell'ordine in cui appaiono nel testo. Se non vengono trovati codici aeroportuali, restituisci un elenco vuoto. |
| User | Il mio prossimo viaggio prevede di volare da Seattle ad Amsterdam. Passerò alcuni giorni ad Amsterdam prima di dirigermi a Parigi per un volo di collegamento a Roma. |
Ecco l'elenco dei codici aeroportuali menzionati nel testo, nell'ordine in cui appaiono:
- SEA (Seattle)
- AMS (Amsterdam)
- CDG (Parigi)
- FCO (Roma)
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-6",
max_tokens=1000,
temperature=0,
system="Your task is to analyze the provided text and identify any airport codes mentioned within it. Present these airport codes as a list in the order they appear in the text. If no airport codes are found, return an empty list.",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "My next trip involves flying from Seattle to Amsterdam. I'll be spending a few days in Amsterdam before heading to Paris for a connecting flight to Rome."
}
]
}
]
)
print(message.content)
Was this page helpful?