diff --git a/README.md b/README.md index c4969b5..4a13018 100644 --- a/README.md +++ b/README.md @@ -26,4 +26,6 @@ This project stores [Plugins](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web | [CodeInterpreter](./plugins/codeinterpreterapi) | - | from: [leezhuuuuu/Code-Interpreter-Api](https://github.com/leezhuuuuu/Code-Interpreter-Api) | | [Chat PDF](./plugins/chatpdf) | - | from: [PDF AI Reader Chat (4.1 ★)](https://chatgpt.com/g/g-oMM2c1bD3) | | [Jina URL Content Reader](./plugins/jina-r) | - | Converts any URL to an LLM-friendly input | +| [Kolors SilliconFlow Draw API](./plugins/KolorsSiliconFlow) | bearer | Draws images from text prompts with model Kwai-Kolors/Kolors | +| [Tavily Search](./plugins/tavilysearch) | bearer | Tavily is a search engine optimized for LLMs, aimed at efficient, quick and persistent search results. | diff --git a/plugins/KolorsSiliconFlow/README.md b/plugins/KolorsSiliconFlow/README.md new file mode 100644 index 0000000..59ced23 --- /dev/null +++ b/plugins/KolorsSiliconFlow/README.md @@ -0,0 +1,57 @@ +# KolorsSiliconFlowAPI (Kwai-Kolors/Kolors) + +> Kolors is a large-scale text-to-image generation model based on latent diffusion developed by the Kuaishou Kolors team. The model has been trained on billions of text-image pairs and has shown significant advantages in visual quality, complex semantic accuracy, and Chinese and English character rendering. It not only supports Chinese and English input, but also performs well in understanding and generating Chinese-specific content. + +> Refer to [SiliconFlow API Manual of images-generation](https://docs.siliconflow.cn/cn/api-reference/images/images-generations) + +## Schema +[openapi.json](./openapi.json) + +## Servers + +`https://api.siliconflow.cn/v1` + +## Supported Models + +## Limits + +> refering to [SiliconFlow Function Calling](https://docs.siliconflow.cn/cn/userguide/guides/function-calling) + +Only available in the those models supports function-calling. + +In SiliconFlow, the models support function-calling are: + +- Deepseek 系列: + - deepseek-ai/DeepSeek-V2.5 + +- 书生系列: + - internlm/internlm2_5-20b-chat + - internlm/internlm2_5-7b-chat + - Pro/internlm/internlm2_5-7b-chat + +- Qwen系列: + - Qwen/Qwen2.5-72B-Instruct + - Qwen/Qwen2.5-32B-Instruct + - Qwen/Qwen2.5-14B-Instruct + - Qwen/Qwen2.5-7B-Instruct + - Pro/Qwen/Qwen2.5-7B-Instruct + +- GLM 系列: + - THUDM/glm-4-9b-chat + - Pro/THUDM/glm-4-9b-chat + +> Also, other models by other providers that can raise function-calling are supported. + + +## Authentication + +``` +type: bearer +location: header +``` + +## Preview + +![Preview](./preview.png) + + diff --git a/plugins/KolorsSiliconFlow/openapi.json b/plugins/KolorsSiliconFlow/openapi.json new file mode 100644 index 0000000..75c00bd --- /dev/null +++ b/plugins/KolorsSiliconFlow/openapi.json @@ -0,0 +1,150 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "SiliconFlow Image Generation API", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.siliconflow.cn/v1" + } + ], + "paths": { + "/images/generations": { + "post": { + "summary": "Generates an image based on a given prompt.", + "operationId": "generateImage", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["model", "prompt", "image_size", "batch_size", "num_inference_steps", "guidance_scale"], + "properties": { + "model": { + "type": "string", + "enum": ["Kwai-Kolors/Kolors"], + "description": "The name of the model to be used." + }, + "prompt": { + "type": "string", + "description": "A text description of the desired image." + }, + "negative_prompt": { + "type": "string", + "description": "A description of elements you do not want in the generated image." + }, + "image_size": { + "type": "string", + "enum": ["1024x1024", "960x1280", "768x1024", "720x1440", "720x1280", "others"], + "description": "The size of the generated image." + }, + "batch_size": { + "type": "integer", + "minimum": 1, + "maximum": 4, + "description": "The number of images to generate." + }, + "num_inference_steps": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "The number of inference steps." + }, + "guidance_scale": { + "type": "number", + "minimum": 0, + "maximum": 20, + "description": "A value that controls how closely the generated image aligns with the prompt." + }, + "seed": { + "type": "integer", + "minimum": 0, + "maximum": 9999999999, + "description": "The random seed used for image generation." + }, + "image": { + "type": "string", + "description": "An image to be uploaded, encoded in base64 format." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Image successfully generated.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "images": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "The URL of the generated image, valid for one hour." + } + } + } + }, + "timings": { + "type": "object", + "properties": { + "inference": { + "type": "number", + "description": "The time taken for inference." + } + } + }, + "seed": { + "type": "integer", + "description": "The random seed used for image generation." + } + } + } + } + } + }, + "400": { + "description": "Bad request." + }, + "401": { + "description": "Unauthorized." + }, + "404": { + "description": "Not found." + }, + "429": { + "description": "Too many requests." + }, + "503": { + "description": "Service unavailable." + }, + "504": { + "description": "Gateway timeout." + } + }, + "security": [ + { + "Authorization": [] + } + ] + } + } + }, + "components": { + "securitySchemes": { + "Authorization": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "API Key" + } + } + } +} diff --git a/plugins/KolorsSiliconFlow/preview.png b/plugins/KolorsSiliconFlow/preview.png new file mode 100644 index 0000000..13a68da Binary files /dev/null and b/plugins/KolorsSiliconFlow/preview.png differ diff --git a/plugins/tavilysearch/README.md b/plugins/tavilysearch/README.md new file mode 100644 index 0000000..5219257 --- /dev/null +++ b/plugins/tavilysearch/README.md @@ -0,0 +1,37 @@ +# Tavily Search & Extract + +> Tavily is a search engine optimized for LLMs, aimed at efficient, quick and persistent search results. + +## Get an API Key + +[request an API key](https://app.tavily.com/) + +## Schema +[openapi.json](./openapi.json) + +## Servers + +`https://api.tavily.com` + +## Operations + +1. Tavily Search +> `POST` path=`/search` body=`{'query': }` + +2. Tavily Extract +> `POST` path=`/extract` body=`{'urls': }` + +## Authentication + +``` +type: Bearer +position: header +``` + +![Authentication](./authentication.png) + +## Preview + +![Preview](./preview.png) + + diff --git a/plugins/tavilysearch/authentication.png b/plugins/tavilysearch/authentication.png new file mode 100644 index 0000000..bdd2c4d Binary files /dev/null and b/plugins/tavilysearch/authentication.png differ diff --git a/plugins/tavilysearch/openapi.json b/plugins/tavilysearch/openapi.json new file mode 100644 index 0000000..578ec71 --- /dev/null +++ b/plugins/tavilysearch/openapi.json @@ -0,0 +1,312 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Tavily Search & Extract", + "version": "1.0.0", + "description": "API for Tavily search and extract endpoints." + }, + "servers": [ + { + "url": "https://api.tavily.com", + "description": "Production server" + } + ], + "paths": { + "/search": { + "post": { + "summary": "Tavily Search", + "description": "Execute a search query using Tavily Search.", + "operationId": "tavilySearch", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "The search query to execute with Tavily." + }, + "topic": { + "type": "string", + "enum": ["general", "news"], + "default": "general", + "description": "The category of the search." + }, + "search_depth": { + "type": "string", + "enum": ["basic", "advanced"], + "default": "basic", + "description": "The depth of the search. A 'basic' search costs 1 credit while 'advanced' costs 2 credits." + }, + "max_results": { + "type": "integer", + "default": 5, + "minimum": 0, + "maximum": 20, + "description": "The maximum number of search results to return." + }, + "time_range": { + "type": "string", + "enum": ["day", "week", "month", "year", "d", "w", "m", "y"], + "nullable": true, + "description": "The time range back from the current date to filter results." + }, + "days": { + "type": "integer", + "default": 3, + "minimum": 0, + "description": "Number of days back from the current date to include. Available only if topic is 'news'." + }, + "include_answer": { + "type": "boolean", + "default": false, + "description": "Include an LLM-generated answer to the provided query." + }, + "include_raw_content": { + "type": "boolean", + "default": false, + "description": "Include the cleaned and parsed HTML content of each search result." + }, + "include_images": { + "type": "boolean", + "default": false, + "description": "Also perform an image search and include the results in the response." + }, + "include_image_descriptions": { + "type": "boolean", + "default": false, + "description": "When include_images is true, also add a descriptive text for each image." + }, + "include_domains": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of domains to specifically include in the search results." + }, + "exclude_domains": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of domains to specifically exclude from the search results." + } + }, + "required": ["query"] + } + } + } + }, + "responses": { + "200": { + "description": "Search results returned successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "type": "string" + }, + "answer": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + }, + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "url": { + "type": "string" + }, + "content": { + "type": "string" + }, + "score": { + "type": "number" + }, + "raw_content": { + "type": ["string", "null"] + } + } + } + }, + "response_time": { + "type": "number", + "description": "Time in seconds it took to complete the request." + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "429": { + "description": "Too Many Requests" + }, + "500": { + "description": "Internal Server Error" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/extract": { + "post": { + "summary": "Tavily Extract", + "description": "Extract web page content from one or more specified URLs using Tavily Extract.", + "operationId": "tavilyExtract", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "urls": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The URL or list of URLs to extract content from." + }, + "include_images": { + "type": "boolean", + "default": false, + "description": "Include a list of images extracted from the URLs in the response." + }, + "extract_depth": { + "type": "string", + "enum": ["basic", "advanced"], + "default": "basic", + "description": "The depth of the extraction process." + } + }, + "required": ["urls"] + } + } + } + }, + "responses": { + "200": { + "description": "Extraction results returned successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "raw_content": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "failed_results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "error": { + "type": "string" + } + } + } + }, + "response_time": { + "type": "number", + "description": "Time in seconds it took to complete the request." + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "429": { + "description": "Too Many Requests" + }, + "500": { + "description": "Internal Server Error" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + } + }, + "components": { + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + } + } +} \ No newline at end of file diff --git a/plugins/tavilysearch/preview.png b/plugins/tavilysearch/preview.png new file mode 100644 index 0000000..0e96767 Binary files /dev/null and b/plugins/tavilysearch/preview.png differ