Skip to content

mifurm/ghcopilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧳 Family Trip Planner Chat App

A simple Python-based chat application that helps you plan a trip to a specific country, on specific dates, with your wife and children. Built with the help of GitHub Copilot.

✨ Features

  • Chat interface to interact with a trip planning bot
  • Extracts destination, travel dates, and family details from user input
  • Suggests kid-friendly activities and accommodations
  • Stores trip plans locally
  • Generates trip summary
  • Exports trip plan to PDF or email

πŸš€ Getting Started

Prerequisites

  • Python 3.8+
  • Flask
  • Azure OpenAI / Azure AI Foundry account and API key
  • See AZURE_SETUP.md for detailed setup instructions
git clone https://github.com/your-username/family-trip-planner.git
cd family-trip-planner

# Install dependencies
pip install -r requirements.txt

# Configure Azure AI (IMPORTANT!)
cp .env.example .env
# Edit .env and add your Azure OpenAI credentials
# See AZURE_SETUP.md for detailed instructions

# Run the app
python app.py

Then open your browser and go to http://localhost:5000.

⚠️ Important: Configure your Azure AI credentials in .env before running. See AZURE_SETUP.md for complete setup instructions.

🧠 How GitHub Copilot Helped This app was built using GitHub Copilot with the following prompt-driven development steps:

  • Set up a basic Flask app with a chat interface. "Create a Flask web app with a simple HTML form to send and receive chat messages."
  • Make sure you will add the LLM integration using the model from Azure AI Foundry "Make sure you will add the LLM integration using the model from Azure AI Foundry also adding respective env file"
  • Store user input in a session or temporary memory. "Add session support to store user messages and bot responses."
  • Create a function to parse trip details from user input. "Write a function that extracts destination, travel dates, and number of travelers from a message."
  • Integrate OpenAI or local NLP model for chatbot responses. "Connect the chat input to an OpenAI GPT model to generate travel planning responses."
  • Add JSON files with potential flights, hotels and fun activites. Later on I will put them in the database. I need them for testing purposes. "Add JSON files with potential flights, hotels and fun activites. Later on I will put them in the database."
  • Add logic to suggest kid-friendly activities in the destination. "Based on the destination, suggest activities suitable for children."
  • Include a calendar picker for selecting travel dates. "Add a date picker to the chat interface for selecting start and end dates."
  • Store trip plans in a local JSON file or SQLite database. "Save trip details and chat history to a local database for future reference."
  • Add a feature to recommend hotels or accommodations. "Create a function that recommends family-friendly hotels in the selected destination."
  • Implement a summary view of the planned trip. "Generate a summary of the trip including dates, destination, activities, and accommodations."
  • Enable export of trip plan to PDF or email. "Add functionality to export the trip summary to a PDF or send it via email."
  • Explain to me the whole code showing key things "Explain to me the whole code showing key things"
  • Draw a diagram using markdown to present the architecture of the solution "Draw a diagram using markdown to present the architecture of the solution"
  • Add a Dockerfile to repo "Add a Dockerfile to repo"
  • Create a Bicep file to create a simple infrastructure in Azure to host the app and deploy it using a container "Create a Bicep file to create a simple infrastructure in Azure to host the app and deploy it using a container"
  • Can you show me where the system prompt is defined? Can you take it out of the file and put it in a dedicated JSON file so I can change it easily. "Can you show me where the system prompt is defined? Can you take it out of the file and put it in a dedicated JSON file so I can change it easily."
  • Can you add a layer, so we can detect when the prompt can disobey RAI practices? Can you visualize this? "Can you add a layer, so we can detect when the prompt can disobey RAI practices?"
  • Can you explain me how the solution works? "Can you explain me how the solution works?"
  • Please add a test, it can be a dedicated website, where I can check how the layer of the RAI practices works. "Please add a test, it can be a dedicated website, where I can check how the layer of the RAI practices works"

πŸ“ Project Structure

family-trip-planner/
β”‚
β”œβ”€β”€ templates/
β”‚   └── chat.html
β”œβ”€β”€ static/
β”‚   └── style.css
β”œβ”€β”€ app.py
β”œβ”€β”€ planner.py
β”œβ”€β”€ utils.py
β”œβ”€β”€ trip_data.json
└── README.md

πŸ“¬ Contact Created by [Michal Furmankiewicz (Furman)] β€” Sr Solution Engineer Feel free to reach out for consulting or GitHub Copilot demos!

Codespaces

Open in GitHub Codespaces

See all Codespaces

About

GitHub Copilot Sample

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published