Loading...
    • 開発者ガイド
    • APIリファレンス
    • MCP
    • リソース
    • リリースノート
    Search...
    ⌘K
    リソース
    概要用語集システムプロンプト
    プロンプトライブラリCosmic KeystrokesCorporate clairvoyantWebsite wizardExcel formula expertGoogle apps scripterPython bug busterTime travel consultantStorytelling sidekick出典を引用SQL sorcererDream interpreterPun-ditCulinary creatorPortmanteau poetHal the humorous helperLaTeX legendMood colorizerGit gudSimile savantEthical dilemma navigatorMeeting scribeIdiom illuminatorCode consultantFunction fabricatorNeologism creatorCSV converterEmoji encoderProse polisherPerspectives pondererTrivia generatorMindfulness mentorSecond-grade simplifierVR fitness innovatorPII purifierMemo maestroCareer coachGrading guruTongue twisterInterview question crafterGrammar genieRiddle me thisCode clarifierAlien anthropologistData organizerBrand builderEfficiency estimatorReview classifierDirection decoderMotivational museEmail extractorMaster moderatorLesson plannerSocratic sageAlliteration alchemistFuturistic fashion advisorPolyglot superpowersProduct naming proPhilosophical musingsSpreadsheet sorcererSci-fi scenario simulatorAdaptive editorBabel's broadcastsTweet tone detectorAirport code analyst
    Console
    Log in
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Partners

    • Amazon Bedrock
    • Google Cloud's Vertex AI

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Help and security

    • Availability
    • Status
    • Support
    • Discord

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    プロンプトライブラリ

    空港コード分析

    テキストから空港コードを見つけて抽出します。

    このプロンプトを開発者Consoleにコピーして、ご自身で試してみてください!

    Content
    Systemあなたのタスクは、提供されたテキストを分析し、その中に記載されている空港コードを特定することです。これらの空港コードを、テキストに現れる順序でリストとして提示してください。空港コードが見つからない場合は、空のリストを返してください。
    User私の次の旅行では、シアトルからアムステルダムまで飛行機で移動します。アムステルダムで数日間過ごした後、パリに向かい、そこからローマへの乗り継ぎ便に乗る予定です。

    出力例

    テキストに記載されている空港コードのリストを、現れる順序で示します:

    1. SEA (シアトル)
    2. AMS (アムステルダム)
    3. CDG (パリ)
    4. FCO (ローマ)

    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=0,
        system="あなたのタスクは、提供されたテキストを分析し、その中に記載されている空港コードを特定することです。これらの空港コードを、テキストに現れる順序でリストとして提示してください。空港コードが見つからない場合は、空のリストを返してください。",
        messages=[
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "私の次の旅行では、シアトルからアムステルダムまで飛行機で移動します。アムステルダムで数日間過ごした後、パリに向かい、そこからローマへの乗り継ぎ便に乗る予定です。"
                    }
                ]
            }
        ]
    )
    print(message.content)
    
    • APIリクエスト