Build your conversation-based search with AI, a simple implementation with Node.js & Vue3.
Live Demo
English | 中文 | 日本語
Repositories: GitHub Gitee CNB
Install Docker.
Project pre-built image Docker Hub
1.Get the code.
git clone https://github.com/yokingma/search_with_ai.git
cd search_with_ai
2.Edit .env.docker file. in docker
directory.
After modifying the .env.docker file, restart the Docker container to apply changes.
You must set at least one KEY.
...
# OpenAI's key & baseUrl
OPENAI_KEY=#your key
OPENAI_PROXY_URL=#baseURL
# Searxng hostname.
SEARXNG_HOSTNAME=http://searxng:8080
3.Edit model.json file. [Optional]
{
"platform": "openai",
"type": "openai",
// add your models
"models": ["o1-preview", "o1-mini", "gpt-4o", "gpt-4o-mini"]
}
4.Run with Docker Compose.
docker compose up -d
Then visit http://localhost:3000
5.Update
docker compose down
docker compose up -d
Support Ollama, LMStudio
Built-in support for search engine: Bing, Google, SearXNG
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>
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.
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.
[2024/09/17] Added Zhipu AI's ChatGLM Web Search plugin, used as a Chinese search engine.
Zhipu AI's glm-flash is currently free, and its Web Search plugin is also free. Based on these two, ChatGLM has been added as a free Chinese search engine.
[2024/11/24] Added Jina Reader URL API, supporting full web content extraction. When selecting the [Research] mode on the web page, the Jina API will be called to extract the full content of the web page as context for the AI. You need to configure JINA_KEY:
# JINA API KEY
JINA_KEY=#your key
Node.js >= 20 Turborepo PackageManager: [email protected]
apps/
| server # backend
| web # frontend
deploy/
| docker-compose.yaml # docker deployment file
| .env.docker # backend configuration file
| model.json # backend model configuration file
...
turbo dev
# or
turbo build
git pull
This repository's source code is available under the MIT License.
Back to top