Giter Site home page Giter Site logo

sinfzx / ai-travel-planner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zinedkaloc/ai-travel-planner

0.0 0.0 0.0 1.01 MB

Travel Planner&Itinerary Generator - Using OpenAI Chat Completion API

Home Page: https://travelplann.com

JavaScript 84.78% CSS 1.08% HTML 14.14%

ai-travel-planner's Introduction

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.

Getting Started

After cloning the backend from Altogic Marketplace, you can rename .env.example to .env and add your REACT_APP_ENDPOINT_URL to the .env file.

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

ai-travel-planner's People

Contributors

zinedkaloc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.