Skip to content

twilight4j/ai-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Search API

AI-powered product search API for e-commerce platform using FastAPI, Langchain, and FAISS.

Features

  • Natural language product search
  • Vector-based similarity search
  • Integration with Oracle RDB
  • OpenAI-powered embeddings and LLM

Setup

  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file based on .env.example and fill in your configuration values.

  2. Run the application:

python main.py

The API will be available at http://localhost:8000

API Documentation

Once the server is running, you can access:

  • Swagger UI documentation: http://localhost:8000/docs
  • ReDoc documentation: http://localhost:8000/redoc

API Endpoints

  • GET /: Health check endpoint
  • POST /search: Search products using natural language query

Project Structure

.
├── main.py              # FastAPI application
├── requirements.txt     # Project dependencies
├── .env                 # Environment variables (create from .env.example)
└── README.md           # This file

Development

The project uses:

  • FastAPI for the web framework
  • Langchain for AI/ML pipeline
  • FAISS for vector similarity search
  • Oracle RDB for product data storage
  • OpenAI for embeddings and LLM

About

An AI search API server built with Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages