bonesoul / ai-travel-planner

Travel Planner&Itinerary Generator - Using OpenAI Chat Completion API

Home Page:https://ai-travel-planner-zeta.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Travel Planner - AI Powered Travel Itinerary Generator

The goal of this project is to use OpenAI GPT-3 Chat completion to generate a travel itinerary for a user. The user will be able to specify a destination, a trip duration, budget and more. The user will also be able to specify a few activities they would like to do. The Travel Planner will then generate a travel itinerary for the user.

How to use

  1. Clone the repo

  2. Install the dependencies

  3. Run the app

  4. Go to http://localhost:3000/

How it works

The app uses OpenAI's GPT-3 API with Altogic Integration to generate the travel itinerary. The app is built using Altogic and React. If you want to learn more about Altogic, check out the Altogic Documentation.

How to integrate with OpenAI

  1. Create an account on OpenAI

  2. Create an API key

  3. Create an account on Altogic

  4. Create a new project

  5. Create a new endpoint and service with POST method and travel as the endpoint path.

  6. Open the service design and click the Start node, and define Request Body to Custom Model and click Add Field and select prompt as the field name.

  7. Click the Marketplace tab and search for OpenAI Chat Completion and move it to the design area.

  8. Click the OpenAI Chat Completion node and fill the prompt with following code:

[
  {
    "role": "user",
    "content": {{CONCAT(input.body.prompt, "Format your response using Markdown. Use headings, subheadings, bullet points, and bold to organize the information.")}}
  }
]
  1. Define the API Key field with your OpenAI API key.

  2. Connect the Start node to the OpenAI Chat Completion node.

  3. Find the Return Success Response node and move it to the design area. Connect the OpenAI Chat Completion node to the Return Success Response node.

  4. Copy the endpoint URL and paste it in the .env file. The .env file should look like this:

REACT_APP_ENDPOINT_URL =
  "https://c3-na.altogic.com/e:6427519d2f0b61e4d9dda50f/travel";
  1. Your service should look like this:

Service design

How to contribute

If you want to contribute to this project, please follow the steps below:

  1. Fork the repo

  2. Create a new branch

  3. Make your changes

  4. Create a pull request

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

About

Travel Planner&Itinerary Generator - Using OpenAI Chat Completion API

https://ai-travel-planner-zeta.vercel.app


Languages

Language:JavaScript 85.5%Language:HTML 13.1%Language:CSS 1.2%Language:Shell 0.3%