Skip to content

🤖 Free Search with AI, 💡 Open-Source Perplexity, 📍 Support Ollama/SearXNG, Support Docker deployment. 让AI大模型和搜索引擎回答你的问题,支持本地大模型(Ollama)、聚合搜索引擎SearXNG,支持Docker一键部署。

License

Notifications You must be signed in to change notification settings

kensen/search_with_ai

Repository files navigation

Search with AI

English 中文

Build your own conversation-based search with AI, a simple implementation with Node.js & Vue3. Live Demo

Search with AI

repo: GitHubGitee

Features

  • Built-in support for LLM: OpenAI, Google, Lepton
  • Built-in support for search engine: Bing, Sogou, Google
  • Customizable pretty UI interface
  • Support dark mode
  • Support mobile display
  • Support local LLM with Ollama
  • Support i18n

LLM

Support API (needs KEY)

  • OpenAI ChatGPT
  • Google Gemini
  • Lepton LLama2、Mixtral8*7B
  • AliYun Qwen
  • Baidu Wenxin
  • 01.ai
  • Moonshot(Kimi)
  • Tencent Hunyuan

Local LLM

Support Ollama, just need run ollama serve.

Search Engine

Built-in support for search engine: Bing, Sogou, Google, SearXNG

SearXNG

install SearXNG with searxng-docker

When you install SearxNG, the only active output format by default is the HTML format. You need to activate the json format to use the API. This can be done by adding the following line to the settings.yml file:

search:
    formats:
        - html
        - json

And set limiter to false:

server:
   limiter: false # default is true

You can also change the host settings in the .env file:

# SEARXNG_HOSTNAME=<host>

Bing Search

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

The Bing Search API is billed, but has a free tier of 1000 calls per month.

Google Search

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.

Sogou Search

For users in China.

Docker

Install Docker.

  • Get the code.
git clone https://github.com/yokingma/search_with_ai.git
cd search_with_ai
  • Edit the .env file to set the Keys.
...
...
# if you run ollama locally, you should set the OLLAMA_HOST.
OLLAMA_HOST=http://localhost:11434
  • build and run with docker.
docker build -t my_image .
docker run -d -p 3000:3000 --name my_app my_image
# linux run with host network
# docker run -d --network host --name my_app my_image

then visit http://localhost:3000

Setup

Required:

Node.js >= 18

  • Server
yarn install && yarn run build
  • Web
cd web && yarn install && yarn run build
  • Config(.env)
// .env
// Bing key
BING_SEARCH_KEY=your-key
// Google search key
GOOGLE_SEARCH_KEY=
GOOGLE_SEARCH_ID=
// aliyun key
ALIYUN_KEY=your-key
// baidu key
BAIDU_KEY=your-key
BAIDU_SECRET=your-secret
// google gemini key & base url
GOOGLE_KEY=
// Google api base url
GOOGLE_PROXY_URL=
// tencent KEY:ID, SECRET:KEY
TENCENT_KEY=
TENCENT_SECRET=
// Yi Key
YI_KEY=
// openai ChatGPT key
OPENAI_KEY=your-key
// openai base url
OPENAI_PROXY_URL=https://api.openai.com/v1
  • Run In the root of the project:
yarn run start 
  • Update In the root of the project:
git pull
yarn install
cd web && yarn install && yarn run build

Now you can visit http://localhost:3000

About

🤖 Free Search with AI, 💡 Open-Source Perplexity, 📍 Support Ollama/SearXNG, Support Docker deployment. 让AI大模型和搜索引擎回答你的问题,支持本地大模型(Ollama)、聚合搜索引擎SearXNG,支持Docker一键部署。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 58.8%
  • Vue 38.1%
  • CSS 1.7%
  • Other 1.4%