Skip to content

AstraBert/PrAIvateSearch

Repository files navigation

PrAIvateSearch

Own your AI, search the web with it🌐😎

Logo

About PrAIvateSearch

PrAIvateSearch is a NextJS web application that aims to implement similar features to SearchGPT, but in an open-source, local and private way.

Flowchart

Logo

Flowchart for PrAIvateSearch

The process of creating and the functioning of PrAIvateSearch is explained in this blog post on HuggingFace.

Installation and usage

Important

For this section, you should have conda package manager, docker and docker compose.

  1. Clone the repository:
git clone https://github.com/AstraBert/PrAIvateSearch.git
cd PrAIvateSearch
  1. Move .env.example to .env...
mv .env.example .env

...and specify PostgreSQL related variables:

# .env file
pgql_db="postgres"
pgql_user="localhost"
pgql_psw="admin"
  1. Install necessary dependencies with conda:
conda env create -f conda_environment.yaml
  1. Set up Crawl4AI inside the conda environment:
conda activate praivatesearch
crawl4ai-setup
crawl4ai-doctor
conda deactivate
  1. Start third-party services:
docker compose up -d
  1. Run Qwen-2.5-1.5B-Instruct on API with FastAPI/Uvicorn:
conda activate praivatesearch
cd qwen-on-api/
uvicorn main:app --host 0.0.0.0 --port 8000

You can access the application from http://localhost:3000 and chat with it!

Usage note

Important

The NextJS application was successfully developed and tested on a Ubuntu 22.04.3 machine, with 32GB RAM, 22 cores CPU and Nvidia GEFORCE RTX4050 GPU (6GB, cuda version 12.3), python version 3.11.11 (packaged by conda 24.11.0)

Although being at a good stage of development, the application is a beta and might still contain bugs and have OS/hardware/python version incompatibilities.

Contributions

Contributions are more than welcome! See contribution guidelines for more information :)

Funding

If you found this project useful, please consider to fund it and make it grow: let's support open-source together!😊

License and rights of usage

This project is provided under MIT license: it will always be open-source and free to use.

If you use this project, please cite the author: Clelia (Astra) Bertelli