Merge pull request #27 from alexZrAl/main

Add plugin SearXNG Search
This commit is contained in:
RiverRay
2025-03-21 23:54:30 +08:00
committed by GitHub
4 changed files with 125 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ This project stores [Plugins](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web
| Name | Authentication | Description |
| ---- | --- | ----------------------------- |
| [SearXNGSearch](./plugins/searxng) | - | Plugin for searxng search engine. |
| [Dalle3](./plugins/dalle) | bearer | openai's dall-e image generator|
| [FluxPro](./plugins/flux) | custom | The pro version of FLUX.1, served in partnership with BFL |
| [WolframAlpha](./plugins/wolframalpha) | custom | A wrapper around Wolfram Alpha |

41
plugins/searxng/README.md Normal file
View File

@@ -0,0 +1,41 @@
# SearXNGSearch
NextChat plugin that connects the model and SearXNG search engine.
## Schema
[openapi.json](./openapi.json)
## Servers
You can use one of the public instances:
[Public SearXNG Instances](https://uptime.searxng.org/)
Or use your own instance (recommended). Either way you will need to modify `openapi.json`:
```json
"servers": [
{
"url": "https://YOUR_SEARXNG_INSTANCE_URL",
"description": "SearXNG instance URL."
}
],
```
## Operations
1. SearXNGSearch
> `GET` /search
## Authentication
```
type: none
```
## Preview
Tested with local docker deployment on Mar.17 2025, using a private searxng instance.
![](preview.jpg)

View File

@@ -0,0 +1,83 @@
{
"openapi": "3.0.0",
"info": {
"title": "SearXNG Search",
"version": "1.0.0"
},
"servers": [
{
"url": "https://YOUR_SEARXNG_INSTANCE_URL",
"description": "SearXNG instance URL."
}
],
"paths": {
"/search": {
"get": {
"summary": "Perform a search query (GET)",
"operationId": "SearXNGSearch",
"parameters": [
{
"name": "q",
"in": "query",
"description": "The search query string.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "category",
"in": "query",
"description": "Category of the search. Defaults to 'general'.",
"schema": {
"type": "string",
"enum": ["general", "news"],
"default": "general"
}
},
{
"name": "format",
"in": "query",
"description": "Output format of the results. Defaults to 'json'.",
"required": true,
"schema": {
"type": "string",
"default": "json"
}
}
],
"responses": {
"200": {
"description": "Search results retrieved successfully.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": { "type": "string" },
"link": { "type": "string" },
"snippet": { "type": "string" }
},
"required": ["title", "link"]
}
},
"total": { "type": "integer" }
},
"required": ["results"]
}
}
}
},
"400": {
"description": "Invalid request parameters."
}
}
}
}
}
}

BIN
plugins/searxng/preview.jpg Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB