Skip to content

Sample Java Application Using OpenAI GPT and YugabyteDB

License

Apache-2.0, Unlicense licenses found

Licenses found

Apache-2.0
LICENSE
Unlicense
LICENSE.md
Notifications You must be signed in to change notification settings

YugabyteDB-Samples/budget-journey-gpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

BudgetJourney - Discover Your Dream City Within Your Budget

Imagine you want to visit a city and have a specific budget in mind. BudgetJourney is an app designed to suggest multiple points of interest within the city, tailored to fit your budget constraints.

This Java-based microservice application leverages the OpenAI GPT API to generate recommendations for points of interest. To optimize costs and reduce the volume of requests to the GPT API, all previous suggestions are stored in a YugabyteDB database. Alternatively, PostgreSQL can be used if required.

Prerequisite

Configuration

Open the application.properties file and provide the following configuration settings:

  1. OpenAI API key:
    openai.key={YOUR_API_KEY}
  2. Database connectivity settings:
    spring.datasource.url = {DATABASE_JDBC_URL}
    spring.datasource.username = {DATABASE_USERNAME}
    spring.datasource.password = {DATABASE_PASSWORD}

Usage

Start the app from a terminal:

mvn spring-boot:run

The application should automatically open a browser window on the following address: http://localhost:8080

tokyo

To experience what BudgetJourney has to offer, simply provide a city name and budget limit. Please note that it may take 30 seconds or more for the OpenAI GPT to generate suggestions. However, to enhance efficiency, all previous suggestions are stored in the YugabyteDB database and will be served from there whenever you inquire about the same city and budget again.

About

Sample Java Application Using OpenAI GPT and YugabyteDB

Topics

Resources

License

Apache-2.0, Unlicense licenses found

Licenses found

Apache-2.0
LICENSE
Unlicense
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published