AI Search is a server application leveraging OpenAI's API to perform intelligent search operations on the Booking.com travel site.
It's Designed with Node.js, and allows users to query structured information in natural language
The code is explained in this Webinar in detail.
- Interactive
fastify
server for creating Booking.com urls, based on the users' natural language input. - Stylish terminal output with
chalk
and clickable links withterminal-link
. - Persistent local storage for caching results and queries with
node-persist
.
- Node.js version >= 20.10.0
- You can set up Node Version Manager for it.
git clone https://github.com/shaialon/ai-search.git
cd ai-search
run nvm use
to have it choose the correct node version. run npm install
to install the various dependencies.
Create a .env
file in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
To start the application server, run:
npm start
You can then make requests like so (via POSTMAN or just a browser):
GET http://localhost:8010/ai_search?search={{url_encoded_query_here}}
npm test
Contributions are welcome! Please open an issue to discuss your idea or submit a pull request.
Especially appreciated:
- Support Booking flexible dates
- Adding support for Anthropic Claude 3
- Adding support for Google Gemini (via Langchain.js)
- Adding a RAG component
- Get data dynamically from Booking
This project is not affiliated with Booking.com, and is meant for demonstration purposes only.
This project is licensed under the MIT License. See the LICENSE file for details.