# SearXNG

SearXNG là một công cụ tìm kiếm tổng hợp miễn phí trên internet, tập hợp kết quả từ nhiều dịch vụ tìm kiếm và cơ sở dữ liệu khác nhau. Người dùng không bị theo dõi hoặc lập hồ sơ. ChatX đã triển khai giao diện để truy cập SearXNG, vì vậy bạn có thể sử dụng nó trực tiếp trong ChatX. Dưới đây là các bước để tích hợp SearXNG vào ChatX.

## 1. Cài đặt SearXNG bằng Docker <a href="#id-1.-install-searxng-using-docker" id="id-1.-install-searxng-using-docker"></a>

```
docker run --rm \
             -d -p 8080:8080 \
             -v "${PWD}/searxng:/etc/searxng" \
             -e "BASE_URL=http://0.0.0.0:8080/" \
             -e "INSTANCE_NAME=searxng" \
             searxng/searxng
```

Nếu bạn có ý định cài đặt SearXNG bằng các phương pháp khác, hãy tham khảo [this page](https://docs.searxng.org/admin/installation.html).

## 2. Thay đổi file settings.yml <a href="#id-2.-change-settings.yml" id="id-2.-change-settings.yml"></a>

Khi bạn cài đặt SearXNG, định dạng đầu ra mặc định là HTML. Bạn cần kích hoạt định dạng json. Thêm dòng sau vào file settings.yml. File settings.yml nằm tại ${PWD}/searxng/settings.yml, như đã trình bày trong ví dụ trước.

```
  # remove format to deny access, use lower case.
  # formats: [html, csv, json, rss]
  formats:
    - html
    - json    # <-- add this line 
```

## 3. Tích hợp SearXNG vào ChatX <a href="#id-3.-integrate-searxng-in-dify" id="id-3.-integrate-searxng-in-dify"></a>

Điền địa chỉ cơ sở <http://x.x.x.x:8080> vào trang `Tools > SearXNG > To Authorize` để kích hoạt nó.

## 4. Hoàn thành <a href="#id-4.-finish" id="id-4.-finish"></a>

Chúc bạn vui vẻ!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.chatx.vn/iv-huong-dan-tich-hop-nang-cao/ket-noi-voi-cac-cong-cu-khac-nhau/searxng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
