Skip to content

Building a quick conversation-based search with AI, a simple implementation with Node.js & Vue3. 基于AI大语言模型(LLM)的对话式快速搜索,一个简单实现,基于Node.js&Vue3。

License

Notifications You must be signed in to change notification settings

kilimro/search_with_ai

 
 

Repository files navigation

Search with AI

English 中文

Updated: 2024/08/31

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

repo: GitHubGitee

Features

  • Built-in support for LLM: OpenAI, Google, Lepton, DeepSeek, Ollama(local)
  • Built-in support for search engine: Bing, Google, SearXNG(Free)
  • Customizable pretty UI interface
  • Support dark mode
  • Support mobile display
  • Support Ollama, LMStudio
  • Support i18n
  • Support Continue Q&A with contexts.
  • Support Cache results, Force reload.
  • Support images search.

Deploy with Docker (recommended)

Install Docker.

1.Get the code.

git clone https://github.com/yokingma/search_with_ai.git
cd search_with_ai

2.Edit .env.docker file.

KEY is required.

...
# OpenAI's key & baseUrl
OPENAI_KEY=#your key
OPENAI_PROXY_URL=#baseURL

# Local llm: Ollama hostname, could modify if you need.
OLLAMA_HOST=http://host.docker.internal:11434

# Searxng hostname, could modify if you need.
SEARXNG_HOSTNAME=http://searxng:8080

3.run with docker-compose.

docker compose up -d

then visit http://localhost:3000

4.Update

Remember to save your .env settings if it has been changed before.

  1. run git pull
  2. Delete old images using Docker Desktop or Docker CLI
  3. run docker compose down
  4. run docker compose up -d

LLMs

Support

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

Local LLM

Support Ollama, LMStudio

Search Engine

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

SearXNG (Free, No Key required)

install SearXNG with searxng-docker

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. The service does not track or profile its users, providing online anonymity for those who seek it. Additionally, SearXNG can be used over Tor for online anonymity.

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 set the host in .env:

# 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.

Setup

Required:

Node.js >= 20

  • Server
yarn install && yarn run build
  • Web
cd web && yarn install && yarn run build
  • Config(.env)

.env is the project configuration file. Please configure it according to your requirements.

.env.docker is for docker deployment.

  • 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

Building a quick conversation-based search with AI, a simple implementation with Node.js & Vue3. 基于AI大语言模型(LLM)的对话式快速搜索,一个简单实现,基于Node.js&Vue3。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 58.5%
  • Vue 38.9%
  • CSS 1.5%
  • Other 1.1%