An open API service indexing awesome lists of open source software.

https://github.com/yokingma/search_with_ai

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

ai chatgpt free llm ollama perplexity rag search

Last synced: 1 day ago
JSON representation

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

Awesome Lists containing this project

README

        


# Open AI Search (Support Deep Research)




Build your conversation-based search with LLM, support DeepResearch / DeepSeek R1.



Live Demo


Github Stars
License
Report a bug
Ask a question

**English** | [中文](./README_ZH_CN.md) | [日本語](./README_JP.md)



Repositories: [GitHub](https://github.com/yokingma/search_with_ai) [CNB](https://cnb.cool/isou/AiSearch)

## Features

* 🔍 **New!** Support "**Deep Research**" like OpenAI/Gemini/Perplexity.
* Built-in support for LLM: OpenAI, Google, Lepton, DeepSeek(R1), SiliconFlow, AliYun, Baidu, ChatGLM, Moonshot, Tencent, Lepton, Yi and more.
* Support Ollama, [LMStudio](https://github.com/lmstudio-ai/lms)
* Built-in support for search engine: Bing, Google, [Tavily](https://tavily.com/), [SearXNG](https://github.com/searxng/searxng)
* Customizable pretty UI interface
* Support light&dark mode/mobile
* Support i18n
* Support Continue Q&A with contexts.
* Support Cache results, Force reload.
* Support images search.

## About DeepResearch

Support "Deep Research" like OpenAI/Gemini/Perplexity, through search engine, web scraping and LLM to iterate on any topic or question, and generate a comprehensive report. Project reference [deep-research](https://github.com/dzhng/deep-research), thanks to author [dzhng](https://github.com/dzhng).

https://github.com/user-attachments/assets/da5e038d-5e0a-4a6f-bae2-b1a58eee193e

**Note:**

- **Warning:** It will cost a lot of Tokens.
- Need to support `Function Calling`.
- Use JINA.ai to extract web page content (No need to configure KEY, limited: 20RPM).

**Workflow:**

1. Analyze user's query.
2. Generate follow-up questions to refine the research direction.
3. Generate and execute search queries.
4. Process and analyze search results.
5. Recursive exploration leads to deeper exploration base on `step 4`.
6. Generate a comprehensive report.

More details can be found in [DeepResearch discussion](https://github.com/yokingma/search_with_ai/issues/116).

## Deploy with Docker (recommended)

[Install Docker](https://docs.docker.com/install/).

```shell
docker pull docker.cnb.cool/aigc/aisearch
```

1.**Get the code.**

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

2.**Edit** [.env.docker](https://github.com/yokingma/search_with_ai/blob/main/.env) **file.** in ```deploy``` directory.

> After modifying the .env.docker file, restart the Docker container to apply changes.

You must set at least one KEY.

```shell
...
# OpenAI's key
OPENAI_KEY=#your key

# Searxng hostname.
SEARXNG_HOSTNAME=http://searxng:8080
```

3.**Edit** [model.json](https://github.com/yokingma/search_with_ai/blob/main/deploy/model.json) **file.** [Optional]

```json
{
"provider": "openai",
"type": "openai",
"baseURL": "https://api.openai.com/v1",
"models": ["o1-preview", "o1-mini", "gpt-4o", "gpt-4o-mini"]
}
```

4.**Run with Docker Compose.**

```shell
docker compose up -d
```

Then visit

5.**Update**

* Delete old images.
* Run ```docker compose down```
* Run ```docker compose up -d```

## Search Engine

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

#### SearXNG (Free, No Key required)

Install [SearXNG](https://github.com/searxng/searxng) with [searxng-docker](https://github.com/searxng/searxng-docker)

Make sure to activate the json format to use the API. This can be done by adding the following line to the settings.yml file:

```yaml
search:
formats:
- html
- json
```

And set limiter to false:

```yaml
server:
limiter: false # default is true
```

`apps/server/.env`:

```shell
# SEARXNG_HOSTNAME=
```

#### Bing Search

To use the Bing Web Search API, please visit [this link](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api) to obtain your Bing subscription key.

#### Google Search

You have three options for Google Search: you can use the SearchApi Google Search API from [SearchApi](https://www.searchapi.io/), [Serper](https://www.serper.dev/) Google Search API from Serper, or opt for the [Programmable Search Engine](https://developers.google.com/custom-search) provided by Google.

#### Tavily Search

[Tavily](https://tavily.com/) is a search engine optimized for LLMs.

#### Jina Reader URL API

[Jina](https://jina.ai/) Reader URL API, supporting full web content extraction. used in [DeepResearch] mode.
JINA KEY is optional (limited to 20RPM).

```shell
# JINA API KEY
JINA_KEY=#your key
```

## Deploy & Development

* Node.js >= 20
* Turborepo
* PackageManager: [email protected]

* **Directory Structure**

```text
apps/
| server # backend
| web # frontend
deploy/
| docker-compose.yaml # docker deployment file
| .env.docker # backend configuration file
| model.json # backend model configuration file
...
```

* **Development & Build**
In the root of the project:

```shell
turbo dev
# or
turbo build
```

* **Update**
In the root of the project:

```shell
git pull
```

## License

This repository's source code is available under the [MIT License](LICENSE).

[🚀Back to top](#top)