Run1 Itinerary Generation

How to serialize the final travel itinerary to a JSON file.

cxcscmu Updated

File contents

Itinerary Generation Skill

Use python's json module to dump the final itinerary in the required format.

import json

itinerary = {
    "plan": [
        {
            "day": 1,
            "current_city": "Minneapolis",
            "transportation": "Self-driving: from Minneapolis to Cleveland",
            "breakfast": "...",
            "lunch": "...",
            "dinner": "...",
            "attraction": "...",
            "accommodation": "..."
        }
    ],
    "data_sources": [
        "accommodations/clean_accommodations_2022.csv"
    ]
}

with open('/app/output/itinerary.json', 'w') as f:
    json.dump(itinerary, f, indent=2)

cxcscmu/SkillLearnBench commit 71bb2e675a

Frequently asked questions

npx get-skill add cxcscmu/run1-itinerary-generation