Sign inSign up

oaklight/search4all

By oaklight

•Updated almost 2 years ago

Personal AI search copilot: an open-source Perplexity alternative.

Image
0

1.0K

oaklight/search4all repository overview

# Search4All The opensource AI search platform
Live Demo ⁠

⁠About me

X⁠
telegram⁠

Buy Me A Coffee

⁠Features

  • Integrated support for LLMs, such as OpenAI, Groq, and Claude.
  • Native search engine integration, including Google, Bing, DuckDuckGo and SearXNG Search.
  • Customizable, visually appealing user interface.
  • Shareable and cached search results for enhanced efficiency.

⁠Setup Search Engine API

Choose your search service

⁠Search1API

Search1API is a versatile search aggregation service that enables you to perform searches across Google, Bing, and DuckDuckGo, and also retrieve clear content from URLs. search1api website⁠

To use the Bing Web Search API, please visit this link⁠ to obtain your Bing subscription key.

You have three options for Google Search: you can use the SearchApi Google Search API⁠ from SearchApi, Serper Google Search API⁠ from Serper, or opt for the Programmable Search Engine⁠ provided by Google.

you can host your personal SearXNG server⁠, then you do not need pay for the search api. You just need provide the server address in SEARXNG_BASE_URL, plz be sure you enable the json format for the SearXNG server.

⁠Deployment

⁠Zeabur

Just click on it

Deploy on Zeabur

⁠Docker

Change the environment variables and run the docker

docker run -d --name search4all -e OPENAI_API_KEY=sk-XXX -e OPENAI_BASE_URL=https://api.openai.com/v1 -e LLM_MODEL=gpt-3.5-turbo-0125 -e RELATED_QUESTIONS=1 -e SEARCH1API_KEY=XXX -e BACKEND=SEARCH1API -p 8800:8800 docker.io/fatwang2/search4all
⁠Docker-Compose
  1. Download the docker-compose file on your mechine
wget https://raw.githubusercontent.com/fatwang2/search4all/main/docker-compose.yml
  1. Change the environment variables in the file

  2. Run the docker

docker compose up -d
⁠Manual
  1. install the requirements.txt
pip3 install -r requirements.txt
  1. Set you LLM
export OPENAI_API_KEY=sk-XXX
OPENAI_BASE_URL=https://api.openai.com/v1
LLM_MODEL=gpt-3.5-turbo-0125
RELATED_QUESTIONS=1
NODE_ENV=production
  1. Set your key of search
export SEARCH1API_KEY=YOUR_SEARCH1API_KEY
  1. Build web
cd web && npm install && npm run build
  1. Run server
BACKEND=SEARCH1API python3 search4all.py

⁠Environment Variable

This project provides some additional configuration items set with environment variables:

Environment VariableRequiredDescriptionExample
OPENAI_API_KEYYesThis is the API key you apply on the OpenAI account pagesk-xxxxxx...xxxxxx
OPENAI_BASE_URLNoIf you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URLOpenAI: https://api.openai.com/v1
Groq: https://api.groq.com/openai/v1
GROQ_API_KEYNoThis is the API key you apply on the Groq account pagegsk_xxxxxx...xxxxxx
ANTHROPIC_API_KEYNoThis is the API key you apply on the Claude account pagesk-ant-xxxxxx...xxxxxx
LLM_MODELYesThe model you want to use,support all chat models of openai, groq and claude.gpt-3.5-turbo-0125,mixtral-8x7b-32768,claude-3-haiku-20240307...
RELATED_QUESTIONSNoShow the related questions.1 or true
NODE_ENVNoThe environment required for deployment is necessary only during manual deployment.production
BACKENDYesThe search service you want.SEARCH1API,BING,GOOGLE,SERPER,SEARCHAPI,SEARXNG
CHAT_HISTORYNoContinue to ask about the results1
SEARCH1API_KEYYesIf you choose SEARCH1API.xxx
BING_SEARCH_V7_SUBSCRIPTION_KEYNoIf you choose BING.xxx
GOOGLE_SEARCH_CXNoIf you choose GOOGLE.xxxx
GOOGLE_SEARCH_API_KEYNoIf you choose GOOGLE.xxx
SEARCHAPI_API_KEYNoIf you choose SEARCHAPI.xxx
SERPER_SEARCH_API_KEYNoIf you choose SERPER.xxx
NEXT_PUBLIC_GOOGLE_ANALYTICSNoYou can use Google Analytics to know how many users you have on your website.MEASUREMENT ID,you can find on your google analytics account,like G-XXXXXX
SEARXNG_BASE_URLNothe hosted serxng server address. it is required when the BACKEND is SEARXNGhttps://serxng.xxx.com/

⁠TODO

  • Support Lepton
  • Support continuous search
  • Support More LLMs
  • Support Searxng Search
  • Support Claude
  • Support Groq
  • Support back to home when searching
  • Support continuous talk about the results
  • Support Google Analytics
  • Support the related questions by function calling
  • Support the Docker
  • Support the Docker-Compose
  • Support the Zeabur

Tag summary

Content type

Image

Digest

sha256:54f2057fd…

Size

55.1 MB

Last updated

almost 2 years ago

docker pull oaklight/search4all