diff --git a/README.md b/README.md index 37f2350..c4969b5 100644 --- a/README.md +++ b/README.md @@ -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 | diff --git a/plugins/searxng/README.md b/plugins/searxng/README.md new file mode 100644 index 0000000..2dfe284 --- /dev/null +++ b/plugins/searxng/README.md @@ -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) diff --git a/plugins/searxng/openapi.json b/plugins/searxng/openapi.json new file mode 100644 index 0000000..4cb4be2 --- /dev/null +++ b/plugins/searxng/openapi.json @@ -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." + } + } + } + } + } +} diff --git a/plugins/searxng/preview.jpg b/plugins/searxng/preview.jpg new file mode 100644 index 0000000..1df09aa Binary files /dev/null and b/plugins/searxng/preview.jpg differ