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