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.
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.
-
Clone the repo
-
Install the dependencies
-
Run the app
-
Go to https://localhost:3000/
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.
-
Create an account on OpenAI
-
Create an API key
-
Create an account on Altogic
-
Create a new project
-
Create a new endpoint and service with
POST
method andtravel
as the endpoint path. -
Open the service design and click the
Start
node, and defineRequest Body
toCustom Model
and clickAdd Field
and selectprompt
as the field name. -
Click the
Marketplace
tab and search forOpenAI Chat Completion
and move it to the design area. -
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.")}}
}
]
-
Define the
API Key
field with your OpenAI API key. -
Connect the
Start
node to theOpenAI Chat Completion
node. -
Find the
Return Success Response
node and move it to the design area. Connect theOpenAI Chat Completion
node to theReturn Success Response
node. -
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";
- Your service should look like this:
If you want to contribute to this project, please follow the steps below:
-
Fork the repo
-
Create a new branch
-
Make your changes
-
Create a pull request
This project is licensed under the MIT License - see the LICENSE.md file for details
-
OpenAI for the GPT-3 API
-
Altogic for the GPT-3 Integration
-
React for the frontend
-
Styled Components for the styling