Coder Social home page Coder Social logo

shaialon / ai-search Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 3.0 472 KB

AI Search is a server application leveraging OpenAI's API to perform intelligent search operations on the Booking.com travel site.

License: MIT License

JavaScript 100.00%
ai openai search search-engine

ai-search's Introduction

AI Search - Booking.com Example

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.

image

Features

  • Interactive fastify server for creating Booking.com urls, based on the users' natural language input.
  • Stylish terminal output with chalk and clickable links with terminal-link.
  • Persistent local storage for caching results and queries with node-persist.

Prerequisites

Installation

Clone the repository

git clone https://github.com/shaialon/ai-search.git
cd ai-search

install the dependencies:

run nvm use to have it choose the correct node version. run npm install to install the various dependencies.

Configuration

Create a .env file in the root directory and add your OpenAI API key:

OPENAI_API_KEY=your_api_key_here

Usage

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}}

To run tests:

npm test

Contributions

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

Disclaimer

This project is not affiliated with Booking.com, and is meant for demonstration purposes only.

License

This project is licensed under the MIT License. See the LICENSE file for details.

ai-search's People

Contributors

shai-orca avatar shaialon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.