Search coordinates and a location title from GPT-3.5-turbo based on a user query, and then renders them as markers on a Leaflet map.
- Next.js
- OpenAI SDK
- React-Leaflet
- Clone the repository
git clone https://github.com/danah-kim/search-location
- Navigate to the project folder and install dependencies
cd your-project-folder
npm install
- Add your OpenAI API key to a
.env
file
OPENAI_API_KEY=your-api-key-here
- Start the development server
npm run dev
- Open the application in a browser.
- Enter a query in the input field.
- Click Icon or press Enter to get the coordinates and title which will be displayed on the map.