Refactor provider schemas to utilize bindata for enhanced localization support
- Updated Schema methods for various providers (OpenAI, Fastembed, MCP, OCR, Office, UTF8, Video, Vision, Whisper) to retrieve schemas from bindata, improving localization capabilities. - Removed outdated JSON files for embedding, extractor, and fetcher providers, streamlining the data structure. - Enhanced the overall provider management by ensuring schemas are dynamically loaded based on locale, facilitating better multi-language support.
This commit is contained in:
parent
6ffc847382
commit
eb1bf43d61
43 changed files with 4970 additions and 208 deletions
770
data/bindata.go
770
data/bindata.go
File diff suppressed because one or more lines are too long
|
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
"github.com/yaoapp/gou/graphrag/converter"
|
||||
"github.com/yaoapp/gou/graphrag/types"
|
||||
"github.com/yaoapp/yao/kb/providers/factory"
|
||||
kbtypes "github.com/yaoapp/yao/kb/types"
|
||||
)
|
||||
|
||||
|
|
@ -128,5 +129,5 @@ func (mcp *MCP) AutoDetect(filename, contentTypes string) (bool, int, error) {
|
|||
|
||||
// Schema returns the schema for the MCP converter
|
||||
func (mcp *MCP) Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error) {
|
||||
return nil, nil
|
||||
return factory.GetSchemaFromBindata(factory.ProviderTypeConverter, "mcp", locale)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import (
|
|||
"github.com/yaoapp/gou/graphrag/converter"
|
||||
"github.com/yaoapp/gou/graphrag/types"
|
||||
"github.com/yaoapp/gou/pdf"
|
||||
"github.com/yaoapp/yao/kb/providers/factory"
|
||||
kbtypes "github.com/yaoapp/yao/kb/types"
|
||||
)
|
||||
|
||||
|
|
@ -169,5 +170,5 @@ func (ocr *OCR) AutoDetect(filename, contentTypes string) (bool, int, error) {
|
|||
|
||||
// Schema returns the schema for the OCR converter
|
||||
func (ocr *OCR) Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error) {
|
||||
return nil, nil
|
||||
return factory.GetSchemaFromBindata(factory.ProviderTypeConverter, "ocr", locale)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import (
|
|||
|
||||
"github.com/yaoapp/gou/graphrag/converter"
|
||||
"github.com/yaoapp/gou/graphrag/types"
|
||||
"github.com/yaoapp/yao/kb/providers/factory"
|
||||
kbtypes "github.com/yaoapp/yao/kb/types"
|
||||
)
|
||||
|
||||
|
|
@ -109,5 +110,5 @@ func (office *Office) AutoDetect(filename, contentTypes string) (bool, int, erro
|
|||
|
||||
// Schema returns the schema for the Office converter
|
||||
func (office *Office) Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error) {
|
||||
return nil, nil
|
||||
return factory.GetSchemaFromBindata(factory.ProviderTypeConverter, "office", locale)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
"github.com/yaoapp/gou/graphrag/converter"
|
||||
"github.com/yaoapp/gou/graphrag/types"
|
||||
"github.com/yaoapp/yao/kb/providers/factory"
|
||||
kbtypes "github.com/yaoapp/yao/kb/types"
|
||||
)
|
||||
|
||||
|
|
@ -44,5 +45,5 @@ func (utf8 *UTF8) AutoDetect(filename, contentTypes string) (bool, int, error) {
|
|||
|
||||
// Schema returns the schema for the UTF8 converter
|
||||
func (utf8 *UTF8) Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error) {
|
||||
return nil, nil
|
||||
return factory.GetSchemaFromBindata(factory.ProviderTypeConverter, "utf8", locale)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import (
|
|||
|
||||
"github.com/yaoapp/gou/graphrag/converter"
|
||||
"github.com/yaoapp/gou/graphrag/types"
|
||||
"github.com/yaoapp/yao/kb/providers/factory"
|
||||
kbtypes "github.com/yaoapp/yao/kb/types"
|
||||
)
|
||||
|
||||
|
|
@ -190,5 +191,5 @@ func (video *Video) AutoDetect(filename, contentTypes string) (bool, int, error)
|
|||
|
||||
// Schema returns the schema for the Video converter
|
||||
func (video *Video) Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error) {
|
||||
return nil, nil
|
||||
return factory.GetSchemaFromBindata(factory.ProviderTypeConverter, "video", locale)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
"github.com/yaoapp/gou/graphrag/converter"
|
||||
"github.com/yaoapp/gou/graphrag/types"
|
||||
"github.com/yaoapp/yao/kb/providers/factory"
|
||||
kbtypes "github.com/yaoapp/yao/kb/types"
|
||||
)
|
||||
|
||||
|
|
@ -94,5 +95,5 @@ func (vision *Vision) AutoDetect(filename, contentTypes string) (bool, int, erro
|
|||
|
||||
// Schema returns the schema for the Vision converter
|
||||
func (vision *Vision) Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error) {
|
||||
return nil, nil
|
||||
return factory.GetSchemaFromBindata(factory.ProviderTypeConverter, "vision", locale)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
"github.com/yaoapp/gou/graphrag/converter"
|
||||
"github.com/yaoapp/gou/graphrag/types"
|
||||
"github.com/yaoapp/yao/kb/providers/factory"
|
||||
kbtypes "github.com/yaoapp/yao/kb/types"
|
||||
)
|
||||
|
||||
|
|
@ -144,5 +145,5 @@ func (whisper *Whisper) AutoDetect(filename, contentTypes string) (bool, int, er
|
|||
|
||||
// Schema returns the schema for the Whisper converter
|
||||
func (whisper *Whisper) Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error) {
|
||||
return nil, nil
|
||||
return factory.GetSchemaFromBindata(factory.ProviderTypeConverter, "whisper", locale)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ func (o *OpenAI) Make(option *kbtypes.ProviderOption) (types.Embedding, error) {
|
|||
|
||||
// Schema returns the schema for the OpenAI embedding provider
|
||||
func (o *OpenAI) Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error) {
|
||||
return nil, nil
|
||||
return factory.GetSchemaFromBindata(factory.ProviderTypeEmbedding, "openai", locale)
|
||||
}
|
||||
|
||||
// === Fastembed ===
|
||||
|
|
@ -142,5 +142,5 @@ func (f *Fastembed) Make(option *kbtypes.ProviderOption) (types.Embedding, error
|
|||
|
||||
// Schema returns the schema for the Fastembed embedding provider
|
||||
func (f *Fastembed) Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error) {
|
||||
return nil, nil
|
||||
return factory.GetSchemaFromBindata(factory.ProviderTypeEmbedding, "fastembed", locale)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,5 +129,5 @@ func (e *ExtractorOpenAI) Make(option *kbtypes.ProviderOption) (types.Extraction
|
|||
|
||||
// Schema returns the schema for the OpenAI extractor provider
|
||||
func (e *ExtractorOpenAI) Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error) {
|
||||
return nil, nil
|
||||
return factory.GetSchemaFromBindata(factory.ProviderTypeExtractor, "openai", locale)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ func (f *FetcherHTTP) Make(option *kbtypes.ProviderOption) (types.Fetcher, error
|
|||
|
||||
// Schema returns the schema for the HTTP fetcher provider
|
||||
func (f *FetcherHTTP) Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error) {
|
||||
return nil, nil
|
||||
return factory.GetSchemaFromBindata(factory.ProviderTypeFetcher, "http", locale)
|
||||
}
|
||||
|
||||
// === FetcherMCP ===
|
||||
|
|
@ -156,5 +156,5 @@ func (f *FetcherMCP) Make(option *kbtypes.ProviderOption) (types.Fetcher, error)
|
|||
|
||||
// Schema returns the schema for the MCP fetcher provider
|
||||
func (f *FetcherMCP) Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error) {
|
||||
return nil, nil
|
||||
return factory.GetSchemaFromBindata(factory.ProviderTypeFetcher, "mcp", locale)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
140
yao/data/kb/providers/converter/mcp/en.json
Normal file
140
yao/data/kb/providers/converter/mcp/en.json
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
{
|
||||
"id": "__yao.mcp",
|
||||
"title": "MCP Tool Converter",
|
||||
"description": "Model Context Protocol (MCP) converter that uses external tools for content conversion. Allows integration with custom conversion tools through the MCP interface.",
|
||||
"required": ["id", "tool"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"title": "MCP Server ID",
|
||||
"description": "Identifier of the MCP server to use for conversion.",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"tool": {
|
||||
"type": "string",
|
||||
"title": "Tool Name",
|
||||
"description": "Name of the MCP tool to invoke for conversion.",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"arguments_mapping": {
|
||||
"type": "object",
|
||||
"title": "Arguments Mapping",
|
||||
"description": "Mapping of conversion parameters to MCP tool arguments.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 3,
|
||||
"properties": {
|
||||
"file_path": {
|
||||
"type": "string",
|
||||
"title": "File Path Argument",
|
||||
"description": "MCP tool argument name for the input file path.",
|
||||
"default": "file_path",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"content": {
|
||||
"type": "string",
|
||||
"title": "Content Argument",
|
||||
"description": "MCP tool argument name for file content.",
|
||||
"default": "content",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"format": {
|
||||
"type": "string",
|
||||
"title": "Format Argument",
|
||||
"description": "MCP tool argument name for output format specification.",
|
||||
"default": "format",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"options": {
|
||||
"type": "string",
|
||||
"title": "Options Argument",
|
||||
"description": "MCP tool argument name for additional options.",
|
||||
"default": "options",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
}
|
||||
}
|
||||
},
|
||||
"result_mapping": {
|
||||
"type": "object",
|
||||
"title": "Result Mapping",
|
||||
"description": "Mapping of MCP tool response fields to conversion results.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 4,
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"title": "Content Field",
|
||||
"description": "Response field containing the converted content.",
|
||||
"default": "content",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"metadata": {
|
||||
"type": "string",
|
||||
"title": "Metadata Field",
|
||||
"description": "Response field containing conversion metadata.",
|
||||
"default": "metadata",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"title": "Error Field",
|
||||
"description": "Response field containing error information.",
|
||||
"default": "error",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
"notification_mapping": {
|
||||
"type": "object",
|
||||
"title": "Notification Mapping",
|
||||
"description": "Mapping for MCP notification handling during conversion.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 5,
|
||||
"properties": {
|
||||
"progress": {
|
||||
"type": "string",
|
||||
"title": "Progress Notification",
|
||||
"description": "Notification type for conversion progress updates.",
|
||||
"default": "progress",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"title": "Status Notification",
|
||||
"description": "Notification type for status changes.",
|
||||
"default": "status",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
140
yao/data/kb/providers/converter/mcp/zh-cn.json
Normal file
140
yao/data/kb/providers/converter/mcp/zh-cn.json
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
{
|
||||
"id": "__yao.mcp",
|
||||
"title": "MCP 工具转换器",
|
||||
"description": "模型上下文协议(MCP)转换器,使用外部工具进行内容转换。允许通过 MCP 接口与自定义转换工具集成。",
|
||||
"required": ["id", "tool"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"title": "MCP 服务器 ID",
|
||||
"description": "用于转换的 MCP 服务器标识符。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"tool": {
|
||||
"type": "string",
|
||||
"title": "工具名称",
|
||||
"description": "用于转换的 MCP 工具名称。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"arguments_mapping": {
|
||||
"type": "object",
|
||||
"title": "参数映射",
|
||||
"description": "转换参数到 MCP 工具参数的映射。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 3,
|
||||
"properties": {
|
||||
"file_path": {
|
||||
"type": "string",
|
||||
"title": "文件路径参数",
|
||||
"description": "输入文件路径的 MCP 工具参数名称。",
|
||||
"default": "file_path",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"content": {
|
||||
"type": "string",
|
||||
"title": "内容参数",
|
||||
"description": "文件内容的 MCP 工具参数名称。",
|
||||
"default": "content",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"format": {
|
||||
"type": "string",
|
||||
"title": "格式参数",
|
||||
"description": "输出格式规范的 MCP 工具参数名称。",
|
||||
"default": "format",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"options": {
|
||||
"type": "string",
|
||||
"title": "选项参数",
|
||||
"description": "附加选项的 MCP 工具参数名称。",
|
||||
"default": "options",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
}
|
||||
}
|
||||
},
|
||||
"result_mapping": {
|
||||
"type": "object",
|
||||
"title": "结果映射",
|
||||
"description": "MCP 工具响应字段到转换结果的映射。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 4,
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"title": "内容字段",
|
||||
"description": "包含转换内容的响应字段。",
|
||||
"default": "content",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"metadata": {
|
||||
"type": "string",
|
||||
"title": "元数据字段",
|
||||
"description": "包含转换元数据的响应字段。",
|
||||
"default": "metadata",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"title": "错误字段",
|
||||
"description": "包含错误信息的响应字段。",
|
||||
"default": "error",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
"notification_mapping": {
|
||||
"type": "object",
|
||||
"title": "通知映射",
|
||||
"description": "转换期间 MCP 通知处理的映射。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 5,
|
||||
"properties": {
|
||||
"progress": {
|
||||
"type": "string",
|
||||
"title": "进度通知",
|
||||
"description": "转换进度更新的通知类型。",
|
||||
"default": "progress",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"title": "状态通知",
|
||||
"description": "状态变更的通知类型。",
|
||||
"default": "status",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
228
yao/data/kb/providers/converter/ocr/en.json
Normal file
228
yao/data/kb/providers/converter/ocr/en.json
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
{
|
||||
"id": "__yao.ocr",
|
||||
"title": "OCR Text Recognition",
|
||||
"description": "Optical Character Recognition for extracting text from images and PDF files. Supports various PDF conversion tools and configurable image processing options.",
|
||||
"required": ["vision"],
|
||||
"properties": {
|
||||
"mode": {
|
||||
"type": "string",
|
||||
"title": "Processing Mode",
|
||||
"description": "Processing mode for OCR operations.",
|
||||
"default": "queue",
|
||||
"enum": [
|
||||
{
|
||||
"label": "Queue Mode",
|
||||
"value": "queue",
|
||||
"description": "Process images sequentially in queue",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "Concurrent Mode",
|
||||
"value": "concurrent",
|
||||
"description": "Process images concurrently"
|
||||
}
|
||||
],
|
||||
"component": "Select",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"max_concurrency": {
|
||||
"type": "integer",
|
||||
"title": "Max Concurrency",
|
||||
"description": "Maximum number of concurrent OCR processes.",
|
||||
"default": 4,
|
||||
"minimum": 1,
|
||||
"maximum": 20,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"compress_size": {
|
||||
"type": "integer",
|
||||
"title": "Compress Size (KB)",
|
||||
"description": "Maximum image size in KB before compression.",
|
||||
"default": 512,
|
||||
"minimum": 100,
|
||||
"maximum": 5120,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"force_image_mode": {
|
||||
"type": "boolean",
|
||||
"title": "Force Image Mode",
|
||||
"description": "Force processing PDF as images instead of extracting text directly.",
|
||||
"default": false,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"pdf_tool": {
|
||||
"type": "string",
|
||||
"title": "PDF Conversion Tool",
|
||||
"description": "Tool used to convert PDF pages to images.",
|
||||
"default": "pdftoppm",
|
||||
"enum": [
|
||||
{
|
||||
"label": "pdftoppm",
|
||||
"value": "pdftoppm",
|
||||
"description": "Fast and reliable PDF to image conversion",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "mutool",
|
||||
"value": "mutool",
|
||||
"description": "MuPDF toolkit for PDF processing"
|
||||
},
|
||||
{
|
||||
"label": "ImageMagick",
|
||||
"value": "imagemagick",
|
||||
"description": "Versatile image processing toolkit"
|
||||
}
|
||||
],
|
||||
"component": "Select",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"pdf_tool_path": {
|
||||
"type": "string",
|
||||
"title": "PDF Tool Path",
|
||||
"description": "Custom path to the PDF conversion tool executable.",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"pdf_dpi": {
|
||||
"type": "integer",
|
||||
"title": "PDF DPI",
|
||||
"description": "Resolution in DPI when converting PDF to images.",
|
||||
"default": 150,
|
||||
"minimum": 72,
|
||||
"maximum": 600,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"pdf_format": {
|
||||
"type": "string",
|
||||
"title": "PDF Image Format",
|
||||
"description": "Image format for PDF conversion.",
|
||||
"default": "png",
|
||||
"enum": [
|
||||
{
|
||||
"label": "PNG",
|
||||
"value": "png",
|
||||
"description": "Lossless compression, best quality",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "JPEG",
|
||||
"value": "jpeg",
|
||||
"description": "Lossy compression, smaller file size"
|
||||
}
|
||||
],
|
||||
"component": "Select",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
},
|
||||
"pdf_quality": {
|
||||
"type": "integer",
|
||||
"title": "PDF JPEG Quality",
|
||||
"description": "JPEG quality when using JPEG format (0-100).",
|
||||
"default": 90,
|
||||
"minimum": 10,
|
||||
"maximum": 100,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 9
|
||||
},
|
||||
"vision": {
|
||||
"type": "object",
|
||||
"title": "Vision Converter",
|
||||
"description": "Vision AI converter configuration for text recognition.",
|
||||
"required": true,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 10,
|
||||
"requiredFields": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "Vision Connector",
|
||||
"description": "AI vision model connector for text recognition.",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI Vision",
|
||||
"options": [
|
||||
{
|
||||
"label": "GPT-4o",
|
||||
"value": "openai.gpt-4o",
|
||||
"description": "High-quality vision model with excellent OCR capabilities",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "GPT-4o Mini",
|
||||
"value": "openai.gpt-4o-mini",
|
||||
"description": "Cost-effective vision model for basic OCR tasks"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "Alternative Models",
|
||||
"options": [
|
||||
{
|
||||
"label": "Claude 3.5 Sonnet",
|
||||
"value": "anthropic.claude-3-5-sonnet",
|
||||
"description": "Excellent vision understanding and text extraction"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "Model Name",
|
||||
"description": "Specific model name (optional, uses connector default).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"title": "Custom Prompt",
|
||||
"description": "Custom prompt for text extraction (optional).",
|
||||
"default": "",
|
||||
"component": "TextArea",
|
||||
"width": "full",
|
||||
"order": 3
|
||||
},
|
||||
"compress_size": {
|
||||
"type": "integer",
|
||||
"title": "Image Compress Size (KB)",
|
||||
"description": "Maximum image size before compression for vision API.",
|
||||
"default": 512,
|
||||
"minimum": 100,
|
||||
"maximum": 5120,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"title": "Language",
|
||||
"description": "Expected text language for better recognition.",
|
||||
"default": "Auto",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
228
yao/data/kb/providers/converter/ocr/zh-cn.json
Normal file
228
yao/data/kb/providers/converter/ocr/zh-cn.json
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
{
|
||||
"id": "__yao.ocr",
|
||||
"title": "OCR 文字识别",
|
||||
"description": "光学字符识别,用于从图像和 PDF 文件中提取文本。支持多种 PDF 转换工具和可配置的图像处理选项。",
|
||||
"required": ["vision"],
|
||||
"properties": {
|
||||
"mode": {
|
||||
"type": "string",
|
||||
"title": "处理模式",
|
||||
"description": "OCR 操作的处理模式。",
|
||||
"default": "queue",
|
||||
"enum": [
|
||||
{
|
||||
"label": "队列模式",
|
||||
"value": "queue",
|
||||
"description": "按队列顺序处理图像",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "并发模式",
|
||||
"value": "concurrent",
|
||||
"description": "并发处理图像"
|
||||
}
|
||||
],
|
||||
"component": "Select",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"max_concurrency": {
|
||||
"type": "integer",
|
||||
"title": "最大并发数",
|
||||
"description": "最大并发 OCR 进程数。",
|
||||
"default": 4,
|
||||
"minimum": 1,
|
||||
"maximum": 20,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"compress_size": {
|
||||
"type": "integer",
|
||||
"title": "压缩大小 (KB)",
|
||||
"description": "压缩前图像的最大大小(KB)。",
|
||||
"default": 512,
|
||||
"minimum": 100,
|
||||
"maximum": 5120,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"force_image_mode": {
|
||||
"type": "boolean",
|
||||
"title": "强制图像模式",
|
||||
"description": "强制将 PDF 作为图像处理,而不是直接提取文本。",
|
||||
"default": false,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"pdf_tool": {
|
||||
"type": "string",
|
||||
"title": "PDF 转换工具",
|
||||
"description": "用于将 PDF 页面转换为图像的工具。",
|
||||
"default": "pdftoppm",
|
||||
"enum": [
|
||||
{
|
||||
"label": "pdftoppm",
|
||||
"value": "pdftoppm",
|
||||
"description": "快速可靠的 PDF 到图像转换",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "mutool",
|
||||
"value": "mutool",
|
||||
"description": "MuPDF 工具包用于 PDF 处理"
|
||||
},
|
||||
{
|
||||
"label": "ImageMagick",
|
||||
"value": "imagemagick",
|
||||
"description": "多功能图像处理工具包"
|
||||
}
|
||||
],
|
||||
"component": "Select",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"pdf_tool_path": {
|
||||
"type": "string",
|
||||
"title": "PDF 工具路径",
|
||||
"description": "PDF 转换工具可执行文件的自定义路径。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"pdf_dpi": {
|
||||
"type": "integer",
|
||||
"title": "PDF DPI",
|
||||
"description": "将 PDF 转换为图像时的分辨率(DPI)。",
|
||||
"default": 150,
|
||||
"minimum": 72,
|
||||
"maximum": 600,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"pdf_format": {
|
||||
"type": "string",
|
||||
"title": "PDF 图像格式",
|
||||
"description": "PDF 转换的图像格式。",
|
||||
"default": "png",
|
||||
"enum": [
|
||||
{
|
||||
"label": "PNG",
|
||||
"value": "png",
|
||||
"description": "无损压缩,最佳质量",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "JPEG",
|
||||
"value": "jpeg",
|
||||
"description": "有损压缩,文件更小"
|
||||
}
|
||||
],
|
||||
"component": "Select",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
},
|
||||
"pdf_quality": {
|
||||
"type": "integer",
|
||||
"title": "PDF JPEG 质量",
|
||||
"description": "使用 JPEG 格式时的质量 (0-100)。",
|
||||
"default": 90,
|
||||
"minimum": 10,
|
||||
"maximum": 100,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 9
|
||||
},
|
||||
"vision": {
|
||||
"type": "object",
|
||||
"title": "视觉转换器",
|
||||
"description": "用于文本识别的视觉 AI 转换器配置。",
|
||||
"required": true,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 10,
|
||||
"requiredFields": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "视觉连接器",
|
||||
"description": "用于文本识别的 AI 视觉模型连接器。",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI 视觉模型",
|
||||
"options": [
|
||||
{
|
||||
"label": "GPT-4o",
|
||||
"value": "openai.gpt-4o",
|
||||
"description": "高质量视觉模型,具有出色的 OCR 能力",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "GPT-4o Mini",
|
||||
"value": "openai.gpt-4o-mini",
|
||||
"description": "基础 OCR 任务的经济型视觉模型"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "其他模型",
|
||||
"options": [
|
||||
{
|
||||
"label": "Claude 3.5 Sonnet",
|
||||
"value": "anthropic.claude-3-5-sonnet",
|
||||
"description": "出色的视觉理解和文本提取能力"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "模型名称",
|
||||
"description": "具体模型名称(可选,使用连接器默认值)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"title": "自定义提示",
|
||||
"description": "文本提取的自定义提示(可选)。",
|
||||
"default": "",
|
||||
"component": "TextArea",
|
||||
"width": "full",
|
||||
"order": 3
|
||||
},
|
||||
"compress_size": {
|
||||
"type": "integer",
|
||||
"title": "图像压缩大小 (KB)",
|
||||
"description": "视觉 API 压缩前的最大图像大小。",
|
||||
"default": 512,
|
||||
"minimum": 100,
|
||||
"maximum": 5120,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"title": "语言",
|
||||
"description": "预期文本语言,以便更好地识别。",
|
||||
"default": "Auto",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
179
yao/data/kb/providers/converter/office/en.json
Normal file
179
yao/data/kb/providers/converter/office/en.json
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
{
|
||||
"id": "__yao.office",
|
||||
"title": "Office Document Converter",
|
||||
"description": "Converts Microsoft Office documents (DOCX, PPTX) to text. Supports extracting text, images, and multimedia content using AI vision and audio processing.",
|
||||
"required": ["vision"],
|
||||
"properties": {
|
||||
"max_concurrency": {
|
||||
"type": "integer",
|
||||
"title": "Max Concurrency",
|
||||
"description": "Maximum number of concurrent office processing operations.",
|
||||
"default": 4,
|
||||
"minimum": 1,
|
||||
"maximum": 20,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"temp_dir": {
|
||||
"type": "string",
|
||||
"title": "Temporary Directory",
|
||||
"description": "Custom temporary directory for file processing (empty = system temp).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"cleanup_temp": {
|
||||
"type": "boolean",
|
||||
"title": "Cleanup Temporary Files",
|
||||
"description": "Automatically clean up temporary files after processing.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"vision": {
|
||||
"type": "object",
|
||||
"title": "Vision Converter",
|
||||
"description": "Vision AI converter for processing images and visual content in documents.",
|
||||
"required": true,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 4,
|
||||
"requiredFields": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "Vision Connector",
|
||||
"description": "AI vision model connector for image analysis.",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI Vision",
|
||||
"options": [
|
||||
{
|
||||
"label": "GPT-4o",
|
||||
"value": "openai.gpt-4o",
|
||||
"description": "High-quality vision model for detailed image analysis",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "GPT-4o Mini",
|
||||
"value": "openai.gpt-4o-mini",
|
||||
"description": "Cost-effective vision model for basic image processing"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "Alternative Models",
|
||||
"options": [
|
||||
{
|
||||
"label": "Claude 3.5 Sonnet",
|
||||
"value": "anthropic.claude-3-5-sonnet",
|
||||
"description": "Excellent vision understanding and content analysis"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "Model Name",
|
||||
"description": "Specific model name (optional, uses connector default).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"title": "Custom Prompt",
|
||||
"description": "Custom prompt for image analysis (optional).",
|
||||
"default": "",
|
||||
"component": "TextArea",
|
||||
"width": "full",
|
||||
"order": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
"video": {
|
||||
"type": "object",
|
||||
"title": "Video Converter (Optional)",
|
||||
"description": "Video converter for processing video content in presentations.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 5,
|
||||
"properties": {
|
||||
"keyframe_interval": {
|
||||
"type": "number",
|
||||
"title": "Keyframe Interval (seconds)",
|
||||
"description": "Interval between extracted keyframes.",
|
||||
"default": 10.0,
|
||||
"minimum": 1.0,
|
||||
"maximum": 60.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"max_keyframes": {
|
||||
"type": "integer",
|
||||
"title": "Max Keyframes",
|
||||
"description": "Maximum number of keyframes to extract.",
|
||||
"default": 20,
|
||||
"minimum": 1,
|
||||
"maximum": 100,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
"type": "object",
|
||||
"title": "Audio Converter (Optional)",
|
||||
"description": "Audio converter for processing audio content in presentations.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 6,
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "Audio Connector",
|
||||
"description": "AI audio transcription connector.",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI Audio",
|
||||
"options": [
|
||||
{
|
||||
"label": "Whisper",
|
||||
"value": "openai.whisper-1",
|
||||
"description": "High-quality audio transcription",
|
||||
"default": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"title": "Language",
|
||||
"description": "Expected audio language (auto-detect if empty).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
179
yao/data/kb/providers/converter/office/zh-cn.json
Normal file
179
yao/data/kb/providers/converter/office/zh-cn.json
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
{
|
||||
"id": "__yao.office",
|
||||
"title": "Office 文档转换器",
|
||||
"description": "转换 Microsoft Office 文档(DOCX、PPTX)为文本。支持使用 AI 视觉和音频处理提取文本、图像和多媒体内容。",
|
||||
"required": ["vision"],
|
||||
"properties": {
|
||||
"max_concurrency": {
|
||||
"type": "integer",
|
||||
"title": "最大并发数",
|
||||
"description": "最大并发 Office 处理操作数。",
|
||||
"default": 4,
|
||||
"minimum": 1,
|
||||
"maximum": 20,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"temp_dir": {
|
||||
"type": "string",
|
||||
"title": "临时目录",
|
||||
"description": "文件处理的自定义临时目录(空 = 系统临时目录)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"cleanup_temp": {
|
||||
"type": "boolean",
|
||||
"title": "清理临时文件",
|
||||
"description": "处理后自动清理临时文件。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"vision": {
|
||||
"type": "object",
|
||||
"title": "视觉转换器",
|
||||
"description": "用于处理文档中图像和视觉内容的视觉 AI 转换器。",
|
||||
"required": true,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 4,
|
||||
"requiredFields": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "视觉连接器",
|
||||
"description": "用于图像分析的 AI 视觉模型连接器。",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI 视觉模型",
|
||||
"options": [
|
||||
{
|
||||
"label": "GPT-4o",
|
||||
"value": "openai.gpt-4o",
|
||||
"description": "用于详细图像分析的高质量视觉模型",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "GPT-4o Mini",
|
||||
"value": "openai.gpt-4o-mini",
|
||||
"description": "基础图像处理的经济型视觉模型"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "其他模型",
|
||||
"options": [
|
||||
{
|
||||
"label": "Claude 3.5 Sonnet",
|
||||
"value": "anthropic.claude-3-5-sonnet",
|
||||
"description": "出色的视觉理解和内容分析能力"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "模型名称",
|
||||
"description": "具体模型名称(可选,使用连接器默认值)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"title": "自定义提示",
|
||||
"description": "图像分析的自定义提示(可选)。",
|
||||
"default": "",
|
||||
"component": "TextArea",
|
||||
"width": "full",
|
||||
"order": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
"video": {
|
||||
"type": "object",
|
||||
"title": "视频转换器(可选)",
|
||||
"description": "用于处理演示文稿中视频内容的视频转换器。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 5,
|
||||
"properties": {
|
||||
"keyframe_interval": {
|
||||
"type": "number",
|
||||
"title": "关键帧间隔(秒)",
|
||||
"description": "提取关键帧之间的间隔。",
|
||||
"default": 10.0,
|
||||
"minimum": 1.0,
|
||||
"maximum": 60.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"max_keyframes": {
|
||||
"type": "integer",
|
||||
"title": "最大关键帧数",
|
||||
"description": "要提取的最大关键帧数。",
|
||||
"default": 20,
|
||||
"minimum": 1,
|
||||
"maximum": 100,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
"type": "object",
|
||||
"title": "音频转换器(可选)",
|
||||
"description": "用于处理演示文稿中音频内容的音频转换器。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 6,
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "音频连接器",
|
||||
"description": "AI 音频转录连接器。",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI 音频",
|
||||
"options": [
|
||||
{
|
||||
"label": "Whisper",
|
||||
"value": "openai.whisper-1",
|
||||
"description": "高质量音频转录",
|
||||
"default": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"title": "语言",
|
||||
"description": "预期音频语言(空则自动检测)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
yao/data/kb/providers/converter/utf8/en.json
Normal file
7
yao/data/kb/providers/converter/utf8/en.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"id": "__yao.utf8",
|
||||
"title": "Plain Text Converter",
|
||||
"description": "Processes plain text files (TXT, MD, etc.) by reading and normalizing UTF-8 content. This is the simplest converter that directly reads text files without any AI processing.",
|
||||
"required": [],
|
||||
"properties": {}
|
||||
}
|
||||
7
yao/data/kb/providers/converter/utf8/zh-cn.json
Normal file
7
yao/data/kb/providers/converter/utf8/zh-cn.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"id": "__yao.utf8",
|
||||
"title": "纯文本转换器",
|
||||
"description": "通过读取和规范化 UTF-8 内容来处理纯文本文件(TXT、MD 等)。这是最简单的转换器,直接读取文本文件而无需任何 AI 处理。",
|
||||
"required": [],
|
||||
"properties": {}
|
||||
}
|
||||
217
yao/data/kb/providers/converter/video/en.json
Normal file
217
yao/data/kb/providers/converter/video/en.json
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
{
|
||||
"id": "__yao.video",
|
||||
"title": "Video Processing",
|
||||
"description": "Processes video files by extracting keyframes and audio for AI analysis. Supports FFmpeg-based video processing with configurable GPU acceleration and quality settings.",
|
||||
"required": [],
|
||||
"properties": {
|
||||
"keyframe_interval": {
|
||||
"type": "number",
|
||||
"title": "Keyframe Interval (seconds)",
|
||||
"description": "Time interval between extracted keyframes for analysis.",
|
||||
"default": 10.0,
|
||||
"minimum": 1.0,
|
||||
"maximum": 300.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"max_keyframes": {
|
||||
"type": "integer",
|
||||
"title": "Max Keyframes",
|
||||
"description": "Maximum number of keyframes to extract from the video.",
|
||||
"default": 20,
|
||||
"minimum": 1,
|
||||
"maximum": 1000,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"temp_dir": {
|
||||
"type": "string",
|
||||
"title": "Temporary Directory",
|
||||
"description": "Custom temporary directory for video processing (empty = system temp).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"cleanup_temp": {
|
||||
"type": "boolean",
|
||||
"title": "Cleanup Temporary Files",
|
||||
"description": "Automatically clean up temporary files after processing.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"max_concurrency": {
|
||||
"type": "integer",
|
||||
"title": "Max Concurrency",
|
||||
"description": "Maximum number of concurrent video processing operations.",
|
||||
"default": 4,
|
||||
"minimum": 1,
|
||||
"maximum": 20,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"text_optimization": {
|
||||
"type": "boolean",
|
||||
"title": "Text Optimization",
|
||||
"description": "Enable text optimization for better content extraction.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"deduplication_ratio": {
|
||||
"type": "number",
|
||||
"title": "Deduplication Ratio",
|
||||
"description": "Threshold for removing duplicate or similar keyframes (0.0-1.0).",
|
||||
"default": 0.8,
|
||||
"minimum": 0.0,
|
||||
"maximum": 1.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"ffmpeg_path": {
|
||||
"type": "string",
|
||||
"title": "FFmpeg Path",
|
||||
"description": "Custom path to FFmpeg executable (empty = use system PATH).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
},
|
||||
"ffprobe_path": {
|
||||
"type": "string",
|
||||
"title": "FFprobe Path",
|
||||
"description": "Custom path to FFprobe executable (empty = use system PATH).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 9
|
||||
},
|
||||
"enable_gpu": {
|
||||
"type": "boolean",
|
||||
"title": "Enable GPU Acceleration",
|
||||
"description": "Use GPU acceleration for video processing if available.",
|
||||
"default": false,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 10
|
||||
},
|
||||
"gpu_index": {
|
||||
"type": "integer",
|
||||
"title": "GPU Index",
|
||||
"description": "GPU device index to use (-1 = auto-detect, 0+ = specific GPU).",
|
||||
"default": -1,
|
||||
"minimum": -1,
|
||||
"maximum": 7,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 11
|
||||
},
|
||||
"max_threads": {
|
||||
"type": "integer",
|
||||
"title": "Max Threads",
|
||||
"description": "Maximum number of threads for FFmpeg processing (-1 = auto).",
|
||||
"default": -1,
|
||||
"minimum": -1,
|
||||
"maximum": 32,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 12
|
||||
},
|
||||
"vision": {
|
||||
"type": "object",
|
||||
"title": "Vision Converter (Optional)",
|
||||
"description": "Vision AI converter for analyzing extracted keyframes.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 13,
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "Vision Connector",
|
||||
"description": "AI vision model connector for keyframe analysis.",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI Vision",
|
||||
"options": [
|
||||
{
|
||||
"label": "GPT-4o",
|
||||
"value": "openai.gpt-4o",
|
||||
"description": "High-quality vision model for detailed frame analysis",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "GPT-4o Mini",
|
||||
"value": "openai.gpt-4o-mini",
|
||||
"description": "Cost-effective vision model for basic frame analysis"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"title": "Vision Prompt",
|
||||
"description": "Custom prompt for keyframe analysis.",
|
||||
"default": "",
|
||||
"component": "TextArea",
|
||||
"width": "full",
|
||||
"order": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
"type": "object",
|
||||
"title": "Audio Converter (Optional)",
|
||||
"description": "Audio converter for processing video soundtrack.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 14,
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "Audio Connector",
|
||||
"description": "AI audio transcription connector.",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI Audio",
|
||||
"options": [
|
||||
{
|
||||
"label": "Whisper",
|
||||
"value": "openai.whisper-1",
|
||||
"description": "High-quality audio transcription",
|
||||
"default": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"title": "Audio Language",
|
||||
"description": "Expected audio language (empty = auto-detect).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
217
yao/data/kb/providers/converter/video/zh-cn.json
Normal file
217
yao/data/kb/providers/converter/video/zh-cn.json
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
{
|
||||
"id": "__yao.video",
|
||||
"title": "视频处理",
|
||||
"description": "通过提取关键帧和音频进行 AI 分析来处理视频文件。支持基于 FFmpeg 的视频处理,具有可配置的 GPU 加速和质量设置。",
|
||||
"required": [],
|
||||
"properties": {
|
||||
"keyframe_interval": {
|
||||
"type": "number",
|
||||
"title": "关键帧间隔(秒)",
|
||||
"description": "用于分析的提取关键帧之间的时间间隔。",
|
||||
"default": 10.0,
|
||||
"minimum": 1.0,
|
||||
"maximum": 300.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"max_keyframes": {
|
||||
"type": "integer",
|
||||
"title": "最大关键帧数",
|
||||
"description": "从视频中提取的最大关键帧数。",
|
||||
"default": 20,
|
||||
"minimum": 1,
|
||||
"maximum": 1000,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"temp_dir": {
|
||||
"type": "string",
|
||||
"title": "临时目录",
|
||||
"description": "视频处理的自定义临时目录(空 = 系统临时目录)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"cleanup_temp": {
|
||||
"type": "boolean",
|
||||
"title": "清理临时文件",
|
||||
"description": "处理后自动清理临时文件。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"max_concurrency": {
|
||||
"type": "integer",
|
||||
"title": "最大并发数",
|
||||
"description": "最大并发视频处理操作数。",
|
||||
"default": 4,
|
||||
"minimum": 1,
|
||||
"maximum": 20,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"text_optimization": {
|
||||
"type": "boolean",
|
||||
"title": "文本优化",
|
||||
"description": "启用文本优化以获得更好的内容提取。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"deduplication_ratio": {
|
||||
"type": "number",
|
||||
"title": "去重比率",
|
||||
"description": "移除重复或相似关键帧的阈值(0.0-1.0)。",
|
||||
"default": 0.8,
|
||||
"minimum": 0.0,
|
||||
"maximum": 1.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"ffmpeg_path": {
|
||||
"type": "string",
|
||||
"title": "FFmpeg 路径",
|
||||
"description": "FFmpeg 可执行文件的自定义路径(空 = 使用系统 PATH)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
},
|
||||
"ffprobe_path": {
|
||||
"type": "string",
|
||||
"title": "FFprobe 路径",
|
||||
"description": "FFprobe 可执行文件的自定义路径(空 = 使用系统 PATH)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 9
|
||||
},
|
||||
"enable_gpu": {
|
||||
"type": "boolean",
|
||||
"title": "启用 GPU 加速",
|
||||
"description": "如果可用,使用 GPU 加速进行视频处理。",
|
||||
"default": false,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 10
|
||||
},
|
||||
"gpu_index": {
|
||||
"type": "integer",
|
||||
"title": "GPU 索引",
|
||||
"description": "要使用的 GPU 设备索引(-1 = 自动检测,0+ = 特定 GPU)。",
|
||||
"default": -1,
|
||||
"minimum": -1,
|
||||
"maximum": 7,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 11
|
||||
},
|
||||
"max_threads": {
|
||||
"type": "integer",
|
||||
"title": "最大线程数",
|
||||
"description": "FFmpeg 处理的最大线程数(-1 = 自动)。",
|
||||
"default": -1,
|
||||
"minimum": -1,
|
||||
"maximum": 32,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 12
|
||||
},
|
||||
"vision": {
|
||||
"type": "object",
|
||||
"title": "视觉转换器(可选)",
|
||||
"description": "用于分析提取关键帧的视觉 AI 转换器。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 13,
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "视觉连接器",
|
||||
"description": "用于关键帧分析的 AI 视觉模型连接器。",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI 视觉模型",
|
||||
"options": [
|
||||
{
|
||||
"label": "GPT-4o",
|
||||
"value": "openai.gpt-4o",
|
||||
"description": "用于详细帧分析的高质量视觉模型",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "GPT-4o Mini",
|
||||
"value": "openai.gpt-4o-mini",
|
||||
"description": "基础帧分析的经济型视觉模型"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"title": "视觉提示",
|
||||
"description": "关键帧分析的自定义提示。",
|
||||
"default": "",
|
||||
"component": "TextArea",
|
||||
"width": "full",
|
||||
"order": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
"type": "object",
|
||||
"title": "音频转换器(可选)",
|
||||
"description": "用于处理视频音轨的音频转换器。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 14,
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "音频连接器",
|
||||
"description": "AI 音频转录连接器。",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI 音频",
|
||||
"options": [
|
||||
{
|
||||
"label": "Whisper",
|
||||
"value": "openai.whisper-1",
|
||||
"description": "高质量音频转录",
|
||||
"default": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"title": "音频语言",
|
||||
"description": "预期音频语言(空 = 自动检测)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
136
yao/data/kb/providers/converter/vision/en.json
Normal file
136
yao/data/kb/providers/converter/vision/en.json
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
{
|
||||
"id": "__yao.vision",
|
||||
"title": "Vision Analysis",
|
||||
"description": "Analyzes images using AI vision models to extract text, describe content, and identify objects. Supports various image formats with configurable compression and language settings.",
|
||||
"required": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "Vision Connector",
|
||||
"description": "AI vision model connector for image analysis.",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI Vision",
|
||||
"options": [
|
||||
{
|
||||
"label": "GPT-4o",
|
||||
"value": "openai.gpt-4o",
|
||||
"description": "High-quality vision model with detailed analysis capabilities",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "GPT-4o Mini",
|
||||
"value": "openai.gpt-4o-mini",
|
||||
"description": "Cost-effective vision model for basic image analysis"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "Alternative Models",
|
||||
"options": [
|
||||
{
|
||||
"label": "Claude 3.5 Sonnet",
|
||||
"value": "anthropic.claude-3-5-sonnet",
|
||||
"description": "Excellent vision understanding and detailed descriptions"
|
||||
},
|
||||
{
|
||||
"label": "Google Gemini Vision",
|
||||
"value": "google.gemini-vision",
|
||||
"description": "Google's multimodal AI with vision capabilities"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "Model Name",
|
||||
"description": "Specific model name (optional, uses connector default).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"title": "Custom Prompt",
|
||||
"description": "Custom prompt for image analysis. Leave empty to use default analysis prompt.",
|
||||
"default": "",
|
||||
"component": "TextArea",
|
||||
"placeholder": "e.g., Describe this image in detail, focusing on text content and key visual elements.",
|
||||
"width": "full",
|
||||
"order": 3
|
||||
},
|
||||
"compress_size": {
|
||||
"type": "integer",
|
||||
"title": "Compress Size (KB)",
|
||||
"description": "Maximum image size in KB before compression for API processing.",
|
||||
"default": 512,
|
||||
"minimum": 100,
|
||||
"maximum": 5120,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"title": "Language",
|
||||
"description": "Expected content language for better analysis (Auto = automatic detection).",
|
||||
"default": "Auto",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "Auto Detect",
|
||||
"value": "Auto",
|
||||
"description": "Automatically detect content language",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "English",
|
||||
"value": "English",
|
||||
"description": "English content analysis"
|
||||
},
|
||||
{
|
||||
"label": "Chinese",
|
||||
"value": "Chinese",
|
||||
"description": "Chinese content analysis"
|
||||
},
|
||||
{
|
||||
"label": "Spanish",
|
||||
"value": "Spanish",
|
||||
"description": "Spanish content analysis"
|
||||
},
|
||||
{
|
||||
"label": "French",
|
||||
"value": "French",
|
||||
"description": "French content analysis"
|
||||
},
|
||||
{
|
||||
"label": "German",
|
||||
"value": "German",
|
||||
"description": "German content analysis"
|
||||
},
|
||||
{
|
||||
"label": "Japanese",
|
||||
"value": "Japanese",
|
||||
"description": "Japanese content analysis"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"options": {
|
||||
"type": "string",
|
||||
"title": "Additional Options (JSON)",
|
||||
"description": "Additional model-specific options in JSON format.",
|
||||
"default": "",
|
||||
"component": "CodeEditor",
|
||||
"width": "full",
|
||||
"order": 6
|
||||
}
|
||||
}
|
||||
}
|
||||
136
yao/data/kb/providers/converter/vision/zh-cn.json
Normal file
136
yao/data/kb/providers/converter/vision/zh-cn.json
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
{
|
||||
"id": "__yao.vision",
|
||||
"title": "视觉分析",
|
||||
"description": "使用 AI 视觉模型分析图像以提取文本、描述内容和识别对象。支持多种图像格式,具有可配置的压缩和语言设置。",
|
||||
"required": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "视觉连接器",
|
||||
"description": "用于图像分析的 AI 视觉模型连接器。",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI 视觉模型",
|
||||
"options": [
|
||||
{
|
||||
"label": "GPT-4o",
|
||||
"value": "openai.gpt-4o",
|
||||
"description": "具有详细分析能力的高质量视觉模型",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "GPT-4o Mini",
|
||||
"value": "openai.gpt-4o-mini",
|
||||
"description": "基础图像分析的经济型视觉模型"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "其他模型",
|
||||
"options": [
|
||||
{
|
||||
"label": "Claude 3.5 Sonnet",
|
||||
"value": "anthropic.claude-3-5-sonnet",
|
||||
"description": "出色的视觉理解和详细描述能力"
|
||||
},
|
||||
{
|
||||
"label": "Google Gemini Vision",
|
||||
"value": "google.gemini-vision",
|
||||
"description": "Google 的多模态 AI,具有视觉能力"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "模型名称",
|
||||
"description": "具体模型名称(可选,使用连接器默认值)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"title": "自定义提示",
|
||||
"description": "图像分析的自定义提示。留空则使用默认分析提示。",
|
||||
"default": "",
|
||||
"component": "TextArea",
|
||||
"placeholder": "例如:详细描述这张图像,重点关注文本内容和关键视觉元素。",
|
||||
"width": "full",
|
||||
"order": 3
|
||||
},
|
||||
"compress_size": {
|
||||
"type": "integer",
|
||||
"title": "压缩大小(KB)",
|
||||
"description": "API 处理前压缩的最大图像大小(KB)。",
|
||||
"default": 512,
|
||||
"minimum": 100,
|
||||
"maximum": 5120,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"title": "语言",
|
||||
"description": "预期内容语言,以便更好地分析(自动 = 自动检测)。",
|
||||
"default": "Auto",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "自动检测",
|
||||
"value": "Auto",
|
||||
"description": "自动检测内容语言",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "英语",
|
||||
"value": "English",
|
||||
"description": "英语内容分析"
|
||||
},
|
||||
{
|
||||
"label": "中文",
|
||||
"value": "Chinese",
|
||||
"description": "中文内容分析"
|
||||
},
|
||||
{
|
||||
"label": "西班牙语",
|
||||
"value": "Spanish",
|
||||
"description": "西班牙语内容分析"
|
||||
},
|
||||
{
|
||||
"label": "法语",
|
||||
"value": "French",
|
||||
"description": "法语内容分析"
|
||||
},
|
||||
{
|
||||
"label": "德语",
|
||||
"value": "German",
|
||||
"description": "德语内容分析"
|
||||
},
|
||||
{
|
||||
"label": "日语",
|
||||
"value": "Japanese",
|
||||
"description": "日语内容分析"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"options": {
|
||||
"type": "string",
|
||||
"title": "附加选项(JSON)",
|
||||
"description": "JSON 格式的附加模型特定选项。",
|
||||
"default": "",
|
||||
"component": "CodeEditor",
|
||||
"width": "full",
|
||||
"order": 6
|
||||
}
|
||||
}
|
||||
}
|
||||
155
yao/data/kb/providers/converter/whisper/en.json
Normal file
155
yao/data/kb/providers/converter/whisper/en.json
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
{
|
||||
"id": "__yao.whisper",
|
||||
"title": "Audio Transcription",
|
||||
"description": "Converts audio files to text using AI speech recognition. Supports automatic language detection, silence detection, and chunk-based processing for long audio files.",
|
||||
"required": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "Audio Connector",
|
||||
"description": "AI audio transcription connector.",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI Audio",
|
||||
"options": [
|
||||
{
|
||||
"label": "Whisper",
|
||||
"value": "openai.whisper-1",
|
||||
"description": "High-quality multilingual audio transcription",
|
||||
"default": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "Alternative Models",
|
||||
"options": [
|
||||
{
|
||||
"label": "Azure Speech",
|
||||
"value": "azure.speech",
|
||||
"description": "Microsoft Azure Speech Services"
|
||||
},
|
||||
{
|
||||
"label": "Google Speech",
|
||||
"value": "google.speech",
|
||||
"description": "Google Cloud Speech-to-Text"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "Model Name",
|
||||
"description": "Specific model name (optional, uses connector default).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"title": "Language",
|
||||
"description": "Expected audio language (empty = auto-detect).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "e.g., en, zh, es, fr",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"chunk_duration": {
|
||||
"type": "number",
|
||||
"title": "Chunk Duration (seconds)",
|
||||
"description": "Duration of each audio chunk for processing.",
|
||||
"default": 30.0,
|
||||
"minimum": 5.0,
|
||||
"maximum": 300.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"mapping_duration": {
|
||||
"type": "number",
|
||||
"title": "Mapping Duration (seconds)",
|
||||
"description": "Duration for timestamp mapping accuracy.",
|
||||
"default": 5.0,
|
||||
"minimum": 1.0,
|
||||
"maximum": 30.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"silence_threshold": {
|
||||
"type": "number",
|
||||
"title": "Silence Threshold (dB)",
|
||||
"description": "Audio level threshold for silence detection.",
|
||||
"default": -40.0,
|
||||
"minimum": -60.0,
|
||||
"maximum": -10.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"silence_min_length": {
|
||||
"type": "number",
|
||||
"title": "Min Silence Length (seconds)",
|
||||
"description": "Minimum silence duration to consider as break.",
|
||||
"default": 1.0,
|
||||
"minimum": 0.1,
|
||||
"maximum": 10.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"enable_silence_detection": {
|
||||
"type": "boolean",
|
||||
"title": "Enable Silence Detection",
|
||||
"description": "Use silence detection for better chunk boundaries.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
},
|
||||
"max_concurrency": {
|
||||
"type": "integer",
|
||||
"title": "Max Concurrency",
|
||||
"description": "Maximum concurrent transcription requests.",
|
||||
"default": 4,
|
||||
"minimum": 1,
|
||||
"maximum": 20,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 9
|
||||
},
|
||||
"temp_dir": {
|
||||
"type": "string",
|
||||
"title": "Temporary Directory",
|
||||
"description": "Custom temporary directory for audio processing (empty = system temp).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 10
|
||||
},
|
||||
"cleanup_temp": {
|
||||
"type": "boolean",
|
||||
"title": "Cleanup Temporary Files",
|
||||
"description": "Automatically clean up temporary files after processing.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 11
|
||||
},
|
||||
"options": {
|
||||
"type": "string",
|
||||
"title": "Additional Options (JSON)",
|
||||
"description": "Additional model-specific options in JSON format.",
|
||||
"default": "",
|
||||
"component": "CodeEditor",
|
||||
"width": "full",
|
||||
"order": 12
|
||||
}
|
||||
}
|
||||
}
|
||||
155
yao/data/kb/providers/converter/whisper/zh-cn.json
Normal file
155
yao/data/kb/providers/converter/whisper/zh-cn.json
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
{
|
||||
"id": "__yao.whisper",
|
||||
"title": "音频转录",
|
||||
"description": "使用 AI 语音识别将音频文件转换为文本。支持自动语言检测、静音检测和长音频文件的分块处理。",
|
||||
"required": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "音频连接器",
|
||||
"description": "AI 音频转录连接器。",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI 音频",
|
||||
"options": [
|
||||
{
|
||||
"label": "Whisper",
|
||||
"value": "openai.whisper-1",
|
||||
"description": "高质量多语言音频转录",
|
||||
"default": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "其他模型",
|
||||
"options": [
|
||||
{
|
||||
"label": "Azure 语音",
|
||||
"value": "azure.speech",
|
||||
"description": "Microsoft Azure 语音服务"
|
||||
},
|
||||
{
|
||||
"label": "Google 语音",
|
||||
"value": "google.speech",
|
||||
"description": "Google Cloud 语音转文本"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "模型名称",
|
||||
"description": "具体模型名称(可选,使用连接器默认值)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"title": "语言",
|
||||
"description": "预期音频语言(空 = 自动检测)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "例如:en, zh, es, fr",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"chunk_duration": {
|
||||
"type": "number",
|
||||
"title": "分块持续时间(秒)",
|
||||
"description": "每个音频分块的处理持续时间。",
|
||||
"default": 30.0,
|
||||
"minimum": 5.0,
|
||||
"maximum": 300.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"mapping_duration": {
|
||||
"type": "number",
|
||||
"title": "映射持续时间(秒)",
|
||||
"description": "时间戳映射精度的持续时间。",
|
||||
"default": 5.0,
|
||||
"minimum": 1.0,
|
||||
"maximum": 30.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"silence_threshold": {
|
||||
"type": "number",
|
||||
"title": "静音阈值(dB)",
|
||||
"description": "静音检测的音频级别阈值。",
|
||||
"default": -40.0,
|
||||
"minimum": -60.0,
|
||||
"maximum": -10.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"silence_min_length": {
|
||||
"type": "number",
|
||||
"title": "最小静音长度(秒)",
|
||||
"description": "被视为中断的最小静音持续时间。",
|
||||
"default": 1.0,
|
||||
"minimum": 0.1,
|
||||
"maximum": 10.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"enable_silence_detection": {
|
||||
"type": "boolean",
|
||||
"title": "启用静音检测",
|
||||
"description": "使用静音检测获得更好的分块边界。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
},
|
||||
"max_concurrency": {
|
||||
"type": "integer",
|
||||
"title": "最大并发数",
|
||||
"description": "最大并发转录请求数。",
|
||||
"default": 4,
|
||||
"minimum": 1,
|
||||
"maximum": 20,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 9
|
||||
},
|
||||
"temp_dir": {
|
||||
"type": "string",
|
||||
"title": "临时目录",
|
||||
"description": "音频处理的自定义临时目录(空 = 系统临时目录)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 10
|
||||
},
|
||||
"cleanup_temp": {
|
||||
"type": "boolean",
|
||||
"title": "清理临时文件",
|
||||
"description": "处理后自动清理临时文件。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 11
|
||||
},
|
||||
"options": {
|
||||
"type": "string",
|
||||
"title": "附加选项(JSON)",
|
||||
"description": "JSON 格式的附加模型特定选项。",
|
||||
"default": "",
|
||||
"component": "CodeEditor",
|
||||
"width": "full",
|
||||
"order": 12
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
232
yao/data/kb/providers/embedding/fastembed/en.json
Normal file
232
yao/data/kb/providers/embedding/fastembed/en.json
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
{
|
||||
"id": "__yao.fastembed",
|
||||
"title": "FastEmbed Embeddings",
|
||||
"description": "FastEmbed local and remote embedding models for high-performance text vectorization. Supports various open-source models with configurable hosting options.",
|
||||
"required": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "FastEmbed Connector",
|
||||
"description": "FastEmbed connector for embedding model access.",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "Local Models",
|
||||
"options": [
|
||||
{
|
||||
"label": "BAAI/bge-small-en-v1.5",
|
||||
"value": "fastembed.bge-small-en-v1.5",
|
||||
"description": "384 dimensions, English optimized, fast inference",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "BAAI/bge-base-en-v1.5",
|
||||
"value": "fastembed.bge-base-en-v1.5",
|
||||
"description": "768 dimensions, English optimized, balanced performance"
|
||||
},
|
||||
{
|
||||
"label": "BAAI/bge-large-en-v1.5",
|
||||
"value": "fastembed.bge-large-en-v1.5",
|
||||
"description": "1024 dimensions, English optimized, highest quality"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "Multilingual Models",
|
||||
"options": [
|
||||
{
|
||||
"label": "BAAI/bge-small-zh-v1.5",
|
||||
"value": "fastembed.bge-small-zh-v1.5",
|
||||
"description": "384 dimensions, Chinese optimized"
|
||||
},
|
||||
{
|
||||
"label": "sentence-transformers/all-MiniLM-L6-v2",
|
||||
"value": "fastembed.all-MiniLM-L6-v2",
|
||||
"description": "384 dimensions, multilingual support"
|
||||
},
|
||||
{
|
||||
"label": "sentence-transformers/all-mpnet-base-v2",
|
||||
"value": "fastembed.all-mpnet-base-v2",
|
||||
"description": "768 dimensions, multilingual, high quality"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "Remote API",
|
||||
"options": [
|
||||
{
|
||||
"label": "Custom API Endpoint",
|
||||
"value": "fastembed.custom",
|
||||
"description": "Connect to custom FastEmbed API endpoint"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "full",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "Model Name (Optional)",
|
||||
"description": "Specific model name to override connector default.",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "e.g., BAAI/bge-small-en-v1.5",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"dimensions": {
|
||||
"type": "integer",
|
||||
"title": "Embedding Dimensions",
|
||||
"description": "Number of dimensions for the embedding vectors.",
|
||||
"default": 384,
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "384 (BGE Small default)",
|
||||
"value": 384,
|
||||
"description": "Standard dimension for small models",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "768 (BGE Base default)",
|
||||
"value": 768,
|
||||
"description": "Standard dimension for base models"
|
||||
},
|
||||
{
|
||||
"label": "1024 (BGE Large default)",
|
||||
"value": 1024,
|
||||
"description": "Standard dimension for large models"
|
||||
},
|
||||
{
|
||||
"label": "512",
|
||||
"value": 512,
|
||||
"description": "Custom dimension for specific models"
|
||||
},
|
||||
{
|
||||
"label": "256",
|
||||
"value": 256,
|
||||
"description": "Reduced dimension for memory efficiency"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"concurrent": {
|
||||
"type": "integer",
|
||||
"title": "Concurrent Requests",
|
||||
"description": "Number of concurrent embedding requests to process.",
|
||||
"default": 10,
|
||||
"minimum": 1,
|
||||
"maximum": 100,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"host": {
|
||||
"type": "string",
|
||||
"title": "API Host (Optional)",
|
||||
"description": "Custom API host for remote FastEmbed service.",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "https://api.example.com",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"title": "API Key (Optional)",
|
||||
"description": "API key for authentication with remote service.",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "your-api-key-here",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"batch_size": {
|
||||
"type": "integer",
|
||||
"title": "Batch Size",
|
||||
"description": "Number of texts to embed in each batch.",
|
||||
"default": 32,
|
||||
"minimum": 1,
|
||||
"maximum": 512,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"max_length": {
|
||||
"type": "integer",
|
||||
"title": "Max Token Length",
|
||||
"description": "Maximum token length for input texts.",
|
||||
"default": 512,
|
||||
"minimum": 64,
|
||||
"maximum": 8192,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
},
|
||||
"normalize": {
|
||||
"type": "boolean",
|
||||
"title": "Normalize Vectors",
|
||||
"description": "Normalize embedding vectors to unit length.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 9
|
||||
},
|
||||
"cache_dir": {
|
||||
"type": "string",
|
||||
"title": "Model Cache Directory",
|
||||
"description": "Directory to cache downloaded models (empty = default cache).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "/path/to/model/cache",
|
||||
"width": "half",
|
||||
"order": 10
|
||||
},
|
||||
"device": {
|
||||
"type": "string",
|
||||
"title": "Compute Device",
|
||||
"description": "Device to use for model inference.",
|
||||
"default": "cpu",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "CPU",
|
||||
"value": "cpu",
|
||||
"description": "Use CPU for inference (compatible with all systems)",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "CUDA (GPU)",
|
||||
"value": "cuda",
|
||||
"description": "Use NVIDIA GPU for faster inference"
|
||||
},
|
||||
{
|
||||
"label": "MPS (Apple Silicon)",
|
||||
"value": "mps",
|
||||
"description": "Use Apple Silicon GPU acceleration"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"value": "auto",
|
||||
"description": "Automatically select best available device"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 11
|
||||
},
|
||||
"threads": {
|
||||
"type": "integer",
|
||||
"title": "CPU Threads",
|
||||
"description": "Number of CPU threads to use (-1 = auto).",
|
||||
"default": -1,
|
||||
"minimum": -1,
|
||||
"maximum": 32,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 12
|
||||
}
|
||||
}
|
||||
}
|
||||
232
yao/data/kb/providers/embedding/fastembed/zh-cn.json
Normal file
232
yao/data/kb/providers/embedding/fastembed/zh-cn.json
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
{
|
||||
"id": "__yao.fastembed",
|
||||
"title": "FastEmbed 嵌入模型",
|
||||
"description": "FastEmbed 本地和远程嵌入模型,用于高性能文本向量化。支持各种开源模型和可配置的托管选项。",
|
||||
"required": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "FastEmbed 连接器",
|
||||
"description": "用于嵌入模型访问的 FastEmbed 连接器。",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "本地模型",
|
||||
"options": [
|
||||
{
|
||||
"label": "BAAI/bge-small-en-v1.5",
|
||||
"value": "fastembed.bge-small-en-v1.5",
|
||||
"description": "384 维度,英语优化,快速推理",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "BAAI/bge-base-en-v1.5",
|
||||
"value": "fastembed.bge-base-en-v1.5",
|
||||
"description": "768 维度,英语优化,平衡性能"
|
||||
},
|
||||
{
|
||||
"label": "BAAI/bge-large-en-v1.5",
|
||||
"value": "fastembed.bge-large-en-v1.5",
|
||||
"description": "1024 维度,英语优化,最高质量"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "多语言模型",
|
||||
"options": [
|
||||
{
|
||||
"label": "BAAI/bge-small-zh-v1.5",
|
||||
"value": "fastembed.bge-small-zh-v1.5",
|
||||
"description": "384 维度,中文优化"
|
||||
},
|
||||
{
|
||||
"label": "sentence-transformers/all-MiniLM-L6-v2",
|
||||
"value": "fastembed.all-MiniLM-L6-v2",
|
||||
"description": "384 维度,多语言支持"
|
||||
},
|
||||
{
|
||||
"label": "sentence-transformers/all-mpnet-base-v2",
|
||||
"value": "fastembed.all-mpnet-base-v2",
|
||||
"description": "768 维度,多语言,高质量"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "远程 API",
|
||||
"options": [
|
||||
{
|
||||
"label": "自定义 API 端点",
|
||||
"value": "fastembed.custom",
|
||||
"description": "连接到自定义 FastEmbed API 端点"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "full",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "模型名称(可选)",
|
||||
"description": "覆盖连接器默认值的特定模型名称。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "例如:BAAI/bge-small-en-v1.5",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"dimensions": {
|
||||
"type": "integer",
|
||||
"title": "嵌入维度",
|
||||
"description": "嵌入向量的维度数量。",
|
||||
"default": 384,
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "384 (BGE Small 默认)",
|
||||
"value": 384,
|
||||
"description": "小型模型的标准维度",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "768 (BGE Base 默认)",
|
||||
"value": 768,
|
||||
"description": "基础模型的标准维度"
|
||||
},
|
||||
{
|
||||
"label": "1024 (BGE Large 默认)",
|
||||
"value": 1024,
|
||||
"description": "大型模型的标准维度"
|
||||
},
|
||||
{
|
||||
"label": "512",
|
||||
"value": 512,
|
||||
"description": "特定模型的自定义维度"
|
||||
},
|
||||
{
|
||||
"label": "256",
|
||||
"value": 256,
|
||||
"description": "降低维度以提高内存效率"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"concurrent": {
|
||||
"type": "integer",
|
||||
"title": "并发请求数",
|
||||
"description": "要处理的并发嵌入请求数量。",
|
||||
"default": 10,
|
||||
"minimum": 1,
|
||||
"maximum": 100,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"host": {
|
||||
"type": "string",
|
||||
"title": "API 主机(可选)",
|
||||
"description": "远程 FastEmbed 服务的自定义 API 主机。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "https://api.example.com",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"title": "API 密钥(可选)",
|
||||
"description": "用于远程服务身份验证的 API 密钥。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "your-api-key-here",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"batch_size": {
|
||||
"type": "integer",
|
||||
"title": "批处理大小",
|
||||
"description": "每批嵌入的文本数量。",
|
||||
"default": 32,
|
||||
"minimum": 1,
|
||||
"maximum": 512,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"max_length": {
|
||||
"type": "integer",
|
||||
"title": "最大令牌长度",
|
||||
"description": "输入文本的最大令牌长度。",
|
||||
"default": 512,
|
||||
"minimum": 64,
|
||||
"maximum": 8192,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
},
|
||||
"normalize": {
|
||||
"type": "boolean",
|
||||
"title": "规范化向量",
|
||||
"description": "将嵌入向量规范化为单位长度。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 9
|
||||
},
|
||||
"cache_dir": {
|
||||
"type": "string",
|
||||
"title": "模型缓存目录",
|
||||
"description": "缓存下载模型的目录(空 = 默认缓存)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "/path/to/model/cache",
|
||||
"width": "half",
|
||||
"order": 10
|
||||
},
|
||||
"device": {
|
||||
"type": "string",
|
||||
"title": "计算设备",
|
||||
"description": "用于模型推理的设备。",
|
||||
"default": "cpu",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "CPU",
|
||||
"value": "cpu",
|
||||
"description": "使用 CPU 进行推理(兼容所有系统)",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "CUDA (GPU)",
|
||||
"value": "cuda",
|
||||
"description": "使用 NVIDIA GPU 进行更快推理"
|
||||
},
|
||||
{
|
||||
"label": "MPS (Apple Silicon)",
|
||||
"value": "mps",
|
||||
"description": "使用 Apple Silicon GPU 加速"
|
||||
},
|
||||
{
|
||||
"label": "自动",
|
||||
"value": "auto",
|
||||
"description": "自动选择最佳可用设备"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 11
|
||||
},
|
||||
"threads": {
|
||||
"type": "integer",
|
||||
"title": "CPU 线程数",
|
||||
"description": "要使用的 CPU 线程数(-1 = 自动)。",
|
||||
"default": -1,
|
||||
"minimum": -1,
|
||||
"maximum": 32,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 12
|
||||
}
|
||||
}
|
||||
}
|
||||
186
yao/data/kb/providers/embedding/openai/en.json
Normal file
186
yao/data/kb/providers/embedding/openai/en.json
Normal file
|
|
@ -0,0 +1,186 @@
|
|||
{
|
||||
"id": "__yao.openai",
|
||||
"title": "OpenAI Embeddings",
|
||||
"description": "OpenAI's text embedding models for converting text into high-dimensional vectors. Supports various embedding models with configurable dimensions and concurrent processing.",
|
||||
"required": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "OpenAI Connector",
|
||||
"description": "OpenAI connector for embedding API access.",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI Models",
|
||||
"options": [
|
||||
{
|
||||
"label": "text-embedding-3-small",
|
||||
"value": "openai.text-embedding-3-small",
|
||||
"description": "Latest small embedding model, 1536 dimensions, cost-effective",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-3-large",
|
||||
"value": "openai.text-embedding-3-large",
|
||||
"description": "Latest large embedding model, 3072 dimensions, highest quality"
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-ada-002",
|
||||
"value": "openai.text-embedding-ada-002",
|
||||
"description": "Previous generation model, 1536 dimensions, reliable"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "Azure OpenAI",
|
||||
"options": [
|
||||
{
|
||||
"label": "Azure text-embedding-3-small",
|
||||
"value": "azure.text-embedding-3-small",
|
||||
"description": "Azure hosted embedding model, 1536 dimensions"
|
||||
},
|
||||
{
|
||||
"label": "Azure text-embedding-3-large",
|
||||
"value": "azure.text-embedding-3-large",
|
||||
"description": "Azure hosted large embedding model, 3072 dimensions"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "full",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "Model Name (Optional)",
|
||||
"description": "Specific model name to override connector default.",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "Use Connector Default",
|
||||
"value": "",
|
||||
"description": "Use the default model from the selected connector",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-3-small",
|
||||
"value": "text-embedding-3-small",
|
||||
"description": "1536 dimensions, cost-effective"
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-3-large",
|
||||
"value": "text-embedding-3-large",
|
||||
"description": "3072 dimensions, highest quality"
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-ada-002",
|
||||
"value": "text-embedding-ada-002",
|
||||
"description": "1536 dimensions, previous generation"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"dimensions": {
|
||||
"type": "integer",
|
||||
"title": "Embedding Dimensions",
|
||||
"description": "Number of dimensions for the embedding vectors.",
|
||||
"default": 1536,
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "1536 (text-embedding-3-small default)",
|
||||
"value": 1536,
|
||||
"description": "Standard dimension for text-embedding-3-small",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "3072 (text-embedding-3-large default)",
|
||||
"value": 3072,
|
||||
"description": "Full dimension for text-embedding-3-large"
|
||||
},
|
||||
{
|
||||
"label": "1024",
|
||||
"value": 1024,
|
||||
"description": "Reduced dimension for smaller storage"
|
||||
},
|
||||
{
|
||||
"label": "512",
|
||||
"value": 512,
|
||||
"description": "Compact dimension for memory efficiency"
|
||||
},
|
||||
{
|
||||
"label": "256",
|
||||
"value": 256,
|
||||
"description": "Minimal dimension for basic similarity"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"concurrent": {
|
||||
"type": "integer",
|
||||
"title": "Concurrent Requests",
|
||||
"description": "Number of concurrent embedding requests to process.",
|
||||
"default": 10,
|
||||
"minimum": 1,
|
||||
"maximum": 100,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"batch_size": {
|
||||
"type": "integer",
|
||||
"title": "Batch Size",
|
||||
"description": "Number of texts to embed in each API request.",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 2048,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"retry_attempts": {
|
||||
"type": "integer",
|
||||
"title": "Retry Attempts",
|
||||
"description": "Number of retry attempts for failed requests.",
|
||||
"default": 3,
|
||||
"minimum": 0,
|
||||
"maximum": 10,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"timeout": {
|
||||
"type": "integer",
|
||||
"title": "Timeout (seconds)",
|
||||
"description": "Request timeout in seconds.",
|
||||
"default": 30,
|
||||
"minimum": 5,
|
||||
"maximum": 300,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"normalize": {
|
||||
"type": "boolean",
|
||||
"title": "Normalize Vectors",
|
||||
"description": "Normalize embedding vectors to unit length.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
},
|
||||
"truncate_input": {
|
||||
"type": "boolean",
|
||||
"title": "Truncate Long Input",
|
||||
"description": "Automatically truncate input text that exceeds token limits.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 9
|
||||
}
|
||||
}
|
||||
}
|
||||
186
yao/data/kb/providers/embedding/openai/zh-cn.json
Normal file
186
yao/data/kb/providers/embedding/openai/zh-cn.json
Normal file
|
|
@ -0,0 +1,186 @@
|
|||
{
|
||||
"id": "__yao.openai",
|
||||
"title": "OpenAI 嵌入模型",
|
||||
"description": "OpenAI 的文本嵌入模型,用于将文本转换为高维向量。支持各种嵌入模型,具有可配置的维度和并发处理。",
|
||||
"required": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "OpenAI 连接器",
|
||||
"description": "用于嵌入 API 访问的 OpenAI 连接器。",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI 模型",
|
||||
"options": [
|
||||
{
|
||||
"label": "text-embedding-3-small",
|
||||
"value": "openai.text-embedding-3-small",
|
||||
"description": "最新的小型嵌入模型,1536 维度,经济高效",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-3-large",
|
||||
"value": "openai.text-embedding-3-large",
|
||||
"description": "最新的大型嵌入模型,3072 维度,最高质量"
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-ada-002",
|
||||
"value": "openai.text-embedding-ada-002",
|
||||
"description": "上一代模型,1536 维度,可靠稳定"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "Azure OpenAI",
|
||||
"options": [
|
||||
{
|
||||
"label": "Azure text-embedding-3-small",
|
||||
"value": "azure.text-embedding-3-small",
|
||||
"description": "Azure 托管的嵌入模型,1536 维度"
|
||||
},
|
||||
{
|
||||
"label": "Azure text-embedding-3-large",
|
||||
"value": "azure.text-embedding-3-large",
|
||||
"description": "Azure 托管的大型嵌入模型,3072 维度"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "full",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "模型名称(可选)",
|
||||
"description": "覆盖连接器默认值的特定模型名称。",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "使用连接器默认",
|
||||
"value": "",
|
||||
"description": "使用所选连接器的默认模型",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-3-small",
|
||||
"value": "text-embedding-3-small",
|
||||
"description": "1536 维度,经济高效"
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-3-large",
|
||||
"value": "text-embedding-3-large",
|
||||
"description": "3072 维度,最高质量"
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-ada-002",
|
||||
"value": "text-embedding-ada-002",
|
||||
"description": "1536 维度,上一代"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"dimensions": {
|
||||
"type": "integer",
|
||||
"title": "嵌入维度",
|
||||
"description": "嵌入向量的维度数量。",
|
||||
"default": 1536,
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "1536 (text-embedding-3-small 默认)",
|
||||
"value": 1536,
|
||||
"description": "text-embedding-3-small 的标准维度",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "3072 (text-embedding-3-large 默认)",
|
||||
"value": 3072,
|
||||
"description": "text-embedding-3-large 的完整维度"
|
||||
},
|
||||
{
|
||||
"label": "1024",
|
||||
"value": 1024,
|
||||
"description": "降低维度以减少存储空间"
|
||||
},
|
||||
{
|
||||
"label": "512",
|
||||
"value": 512,
|
||||
"description": "紧凑维度以提高内存效率"
|
||||
},
|
||||
{
|
||||
"label": "256",
|
||||
"value": 256,
|
||||
"description": "最小维度用于基本相似性"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"concurrent": {
|
||||
"type": "integer",
|
||||
"title": "并发请求数",
|
||||
"description": "要处理的并发嵌入请求数量。",
|
||||
"default": 10,
|
||||
"minimum": 1,
|
||||
"maximum": 100,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"batch_size": {
|
||||
"type": "integer",
|
||||
"title": "批处理大小",
|
||||
"description": "每个 API 请求中嵌入的文本数量。",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 2048,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"retry_attempts": {
|
||||
"type": "integer",
|
||||
"title": "重试次数",
|
||||
"description": "失败请求的重试次数。",
|
||||
"default": 3,
|
||||
"minimum": 0,
|
||||
"maximum": 10,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"timeout": {
|
||||
"type": "integer",
|
||||
"title": "超时时间(秒)",
|
||||
"description": "请求超时时间,以秒为单位。",
|
||||
"default": 30,
|
||||
"minimum": 5,
|
||||
"maximum": 300,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"normalize": {
|
||||
"type": "boolean",
|
||||
"title": "规范化向量",
|
||||
"description": "将嵌入向量规范化为单位长度。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
},
|
||||
"truncate_input": {
|
||||
"type": "boolean",
|
||||
"title": "截断长输入",
|
||||
"description": "自动截断超过令牌限制的输入文本。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 9
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
296
yao/data/kb/providers/extractor/openai/en.json
Normal file
296
yao/data/kb/providers/extractor/openai/en.json
Normal file
|
|
@ -0,0 +1,296 @@
|
|||
{
|
||||
"id": "__yao.openai",
|
||||
"title": "OpenAI Entity Extractor",
|
||||
"description": "AI-powered entity and relationship extraction using OpenAI's language models. Extracts structured information from unstructured text with configurable prompts and tool calling capabilities.",
|
||||
"required": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "OpenAI Connector",
|
||||
"description": "OpenAI connector for extraction API access.",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI Models",
|
||||
"options": [
|
||||
{
|
||||
"label": "GPT-4o",
|
||||
"value": "openai.gpt-4o",
|
||||
"description": "Latest GPT-4o model, excellent for complex extraction tasks",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "GPT-4o Mini",
|
||||
"value": "openai.gpt-4o-mini",
|
||||
"description": "Cost-effective GPT-4o Mini for basic extraction"
|
||||
},
|
||||
{
|
||||
"label": "GPT-4 Turbo",
|
||||
"value": "openai.gpt-4-turbo",
|
||||
"description": "GPT-4 Turbo with enhanced performance"
|
||||
},
|
||||
{
|
||||
"label": "GPT-3.5 Turbo",
|
||||
"value": "openai.gpt-3.5-turbo",
|
||||
"description": "Fast and economical for simple extractions"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "Azure OpenAI",
|
||||
"options": [
|
||||
{
|
||||
"label": "Azure GPT-4o",
|
||||
"value": "azure.gpt-4o",
|
||||
"description": "Azure hosted GPT-4o model"
|
||||
},
|
||||
{
|
||||
"label": "Azure GPT-4",
|
||||
"value": "azure.gpt-4",
|
||||
"description": "Azure hosted GPT-4 model"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "full",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "Model Name (Optional)",
|
||||
"description": "Specific model name to override connector default.",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "Use Connector Default",
|
||||
"value": "",
|
||||
"description": "Use the default model from the selected connector",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "gpt-4o",
|
||||
"value": "gpt-4o",
|
||||
"description": "Latest GPT-4o model"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4o-mini",
|
||||
"value": "gpt-4o-mini",
|
||||
"description": "Cost-effective GPT-4o Mini"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-turbo",
|
||||
"value": "gpt-4-turbo",
|
||||
"description": "GPT-4 Turbo model"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"value": "gpt-3.5-turbo",
|
||||
"description": "GPT-3.5 Turbo model"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"toolcall": {
|
||||
"type": "boolean",
|
||||
"title": "Enable Tool Calling",
|
||||
"description": "Use structured tool calling for more reliable extraction.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"temperature": {
|
||||
"type": "number",
|
||||
"title": "Temperature",
|
||||
"description": "Controls randomness in extraction (0.0 = deterministic, 1.0 = creative).",
|
||||
"default": 0.1,
|
||||
"minimum": 0.0,
|
||||
"maximum": 2.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"max_tokens": {
|
||||
"type": "integer",
|
||||
"title": "Max Tokens",
|
||||
"description": "Maximum number of tokens in the response.",
|
||||
"default": 4000,
|
||||
"minimum": 100,
|
||||
"maximum": 32000,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"concurrent": {
|
||||
"type": "integer",
|
||||
"title": "Concurrent Requests",
|
||||
"description": "Number of concurrent extraction requests to process.",
|
||||
"default": 5,
|
||||
"minimum": 1,
|
||||
"maximum": 50,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"retry_attempts": {
|
||||
"type": "integer",
|
||||
"title": "Retry Attempts",
|
||||
"description": "Number of retry attempts for failed extractions.",
|
||||
"default": 3,
|
||||
"minimum": 0,
|
||||
"maximum": 10,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"retry_delay": {
|
||||
"type": "number",
|
||||
"title": "Retry Delay (seconds)",
|
||||
"description": "Delay between retry attempts in seconds.",
|
||||
"default": 1.0,
|
||||
"minimum": 0.1,
|
||||
"maximum": 60.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"title": "Custom Extraction Prompt",
|
||||
"description": "Custom prompt for entity and relationship extraction (optional).",
|
||||
"default": "",
|
||||
"component": "TextArea",
|
||||
"placeholder": "You are an expert at extracting entities and relationships from text. Extract all relevant entities and their relationships in a structured format...",
|
||||
"width": "full",
|
||||
"order": 9
|
||||
},
|
||||
"extraction_types": {
|
||||
"type": "object",
|
||||
"title": "Extraction Configuration",
|
||||
"description": "Configure what types of entities and relationships to extract.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 10,
|
||||
"properties": {
|
||||
"entities": {
|
||||
"type": "boolean",
|
||||
"title": "Extract Entities",
|
||||
"description": "Extract named entities (people, places, organizations, etc.).",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"relationships": {
|
||||
"type": "boolean",
|
||||
"title": "Extract Relationships",
|
||||
"description": "Extract relationships between entities.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"concepts": {
|
||||
"type": "boolean",
|
||||
"title": "Extract Concepts",
|
||||
"description": "Extract key concepts and themes.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"summaries": {
|
||||
"type": "boolean",
|
||||
"title": "Generate Summaries",
|
||||
"description": "Generate document summaries.",
|
||||
"default": false,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"entity_types": {
|
||||
"type": "string",
|
||||
"title": "Entity Types",
|
||||
"description": "Comma-separated list of entity types to focus on (optional).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "PERSON, ORGANIZATION, LOCATION, EVENT, PRODUCT",
|
||||
"width": "full",
|
||||
"order": 5
|
||||
},
|
||||
"relationship_types": {
|
||||
"type": "string",
|
||||
"title": "Relationship Types",
|
||||
"description": "Comma-separated list of relationship types to focus on (optional).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "WORKS_FOR, LOCATED_IN, PART_OF, RELATED_TO",
|
||||
"width": "full",
|
||||
"order": 6
|
||||
}
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"type": "string",
|
||||
"title": "Custom Tools (JSON)",
|
||||
"description": "Custom tool definitions for structured extraction (advanced usage).",
|
||||
"default": "",
|
||||
"component": "CodeEditor",
|
||||
"width": "full",
|
||||
"order": 11
|
||||
},
|
||||
"quality_settings": {
|
||||
"type": "object",
|
||||
"title": "Quality Settings",
|
||||
"description": "Fine-tune extraction quality and performance.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 12,
|
||||
"properties": {
|
||||
"confidence_threshold": {
|
||||
"type": "number",
|
||||
"title": "Confidence Threshold",
|
||||
"description": "Minimum confidence score for extracted entities (0.0-1.0).",
|
||||
"default": 0.7,
|
||||
"minimum": 0.0,
|
||||
"maximum": 1.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"deduplicate": {
|
||||
"type": "boolean",
|
||||
"title": "Deduplicate Results",
|
||||
"description": "Remove duplicate entities and relationships.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"normalize_entities": {
|
||||
"type": "boolean",
|
||||
"title": "Normalize Entity Names",
|
||||
"description": "Normalize entity names for consistency.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"include_context": {
|
||||
"type": "boolean",
|
||||
"title": "Include Context",
|
||||
"description": "Include surrounding context for extracted entities.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
296
yao/data/kb/providers/extractor/openai/zh-cn.json
Normal file
296
yao/data/kb/providers/extractor/openai/zh-cn.json
Normal file
|
|
@ -0,0 +1,296 @@
|
|||
{
|
||||
"id": "__yao.openai",
|
||||
"title": "OpenAI 实体提取器",
|
||||
"description": "使用 OpenAI 语言模型进行 AI 驱动的实体和关系提取。从非结构化文本中提取结构化信息,支持可配置的提示和工具调用功能。",
|
||||
"required": ["connector"],
|
||||
"properties": {
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"title": "OpenAI 连接器",
|
||||
"description": "用于提取 API 访问的 OpenAI 连接器。",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"groupLabel": "OpenAI 模型",
|
||||
"options": [
|
||||
{
|
||||
"label": "GPT-4o",
|
||||
"value": "openai.gpt-4o",
|
||||
"description": "最新的 GPT-4o 模型,适用于复杂的提取任务",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "GPT-4o Mini",
|
||||
"value": "openai.gpt-4o-mini",
|
||||
"description": "经济高效的 GPT-4o Mini,适用于基础提取"
|
||||
},
|
||||
{
|
||||
"label": "GPT-4 Turbo",
|
||||
"value": "openai.gpt-4-turbo",
|
||||
"description": "性能增强的 GPT-4 Turbo"
|
||||
},
|
||||
{
|
||||
"label": "GPT-3.5 Turbo",
|
||||
"value": "openai.gpt-3.5-turbo",
|
||||
"description": "快速经济,适用于简单提取"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupLabel": "Azure OpenAI",
|
||||
"options": [
|
||||
{
|
||||
"label": "Azure GPT-4o",
|
||||
"value": "azure.gpt-4o",
|
||||
"description": "Azure 托管的 GPT-4o 模型"
|
||||
},
|
||||
{
|
||||
"label": "Azure GPT-4",
|
||||
"value": "azure.gpt-4",
|
||||
"description": "Azure 托管的 GPT-4 模型"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"width": "full",
|
||||
"order": 1
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"title": "模型名称(可选)",
|
||||
"description": "覆盖连接器默认值的特定模型名称。",
|
||||
"default": "",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "使用连接器默认",
|
||||
"value": "",
|
||||
"description": "使用所选连接器的默认模型",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "gpt-4o",
|
||||
"value": "gpt-4o",
|
||||
"description": "最新的 GPT-4o 模型"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4o-mini",
|
||||
"value": "gpt-4o-mini",
|
||||
"description": "经济高效的 GPT-4o Mini"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-turbo",
|
||||
"value": "gpt-4-turbo",
|
||||
"description": "GPT-4 Turbo 模型"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"value": "gpt-3.5-turbo",
|
||||
"description": "GPT-3.5 Turbo 模型"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"toolcall": {
|
||||
"type": "boolean",
|
||||
"title": "启用工具调用",
|
||||
"description": "使用结构化工具调用以获得更可靠的提取。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"temperature": {
|
||||
"type": "number",
|
||||
"title": "温度",
|
||||
"description": "控制提取的随机性(0.0 = 确定性,1.0 = 创造性)。",
|
||||
"default": 0.1,
|
||||
"minimum": 0.0,
|
||||
"maximum": 2.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"max_tokens": {
|
||||
"type": "integer",
|
||||
"title": "最大令牌数",
|
||||
"description": "响应中的最大令牌数。",
|
||||
"default": 4000,
|
||||
"minimum": 100,
|
||||
"maximum": 32000,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"concurrent": {
|
||||
"type": "integer",
|
||||
"title": "并发请求数",
|
||||
"description": "要处理的并发提取请求数。",
|
||||
"default": 5,
|
||||
"minimum": 1,
|
||||
"maximum": 50,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"retry_attempts": {
|
||||
"type": "integer",
|
||||
"title": "重试次数",
|
||||
"description": "失败提取的重试次数。",
|
||||
"default": 3,
|
||||
"minimum": 0,
|
||||
"maximum": 10,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"retry_delay": {
|
||||
"type": "number",
|
||||
"title": "重试延迟(秒)",
|
||||
"description": "重试尝试之间的延迟时间(秒)。",
|
||||
"default": 1.0,
|
||||
"minimum": 0.1,
|
||||
"maximum": 60.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"title": "自定义提取提示",
|
||||
"description": "用于实体和关系提取的自定义提示(可选)。",
|
||||
"default": "",
|
||||
"component": "TextArea",
|
||||
"placeholder": "您是从文本中提取实体和关系的专家。请以结构化格式提取所有相关实体及其关系...",
|
||||
"width": "full",
|
||||
"order": 9
|
||||
},
|
||||
"extraction_types": {
|
||||
"type": "object",
|
||||
"title": "提取配置",
|
||||
"description": "配置要提取的实体和关系类型。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 10,
|
||||
"properties": {
|
||||
"entities": {
|
||||
"type": "boolean",
|
||||
"title": "提取实体",
|
||||
"description": "提取命名实体(人物、地点、组织等)。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"relationships": {
|
||||
"type": "boolean",
|
||||
"title": "提取关系",
|
||||
"description": "提取实体之间的关系。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"concepts": {
|
||||
"type": "boolean",
|
||||
"title": "提取概念",
|
||||
"description": "提取关键概念和主题。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"summaries": {
|
||||
"type": "boolean",
|
||||
"title": "生成摘要",
|
||||
"description": "生成文档摘要。",
|
||||
"default": false,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"entity_types": {
|
||||
"type": "string",
|
||||
"title": "实体类型",
|
||||
"description": "要重点关注的实体类型,用逗号分隔(可选)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "人物, 组织, 地点, 事件, 产品",
|
||||
"width": "full",
|
||||
"order": 5
|
||||
},
|
||||
"relationship_types": {
|
||||
"type": "string",
|
||||
"title": "关系类型",
|
||||
"description": "要重点关注的关系类型,用逗号分隔(可选)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "工作于, 位于, 属于, 相关于",
|
||||
"width": "full",
|
||||
"order": 6
|
||||
}
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"type": "string",
|
||||
"title": "自定义工具(JSON)",
|
||||
"description": "用于结构化提取的自定义工具定义(高级用法)。",
|
||||
"default": "",
|
||||
"component": "CodeEditor",
|
||||
"width": "full",
|
||||
"order": 11
|
||||
},
|
||||
"quality_settings": {
|
||||
"type": "object",
|
||||
"title": "质量设置",
|
||||
"description": "微调提取质量和性能。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 12,
|
||||
"properties": {
|
||||
"confidence_threshold": {
|
||||
"type": "number",
|
||||
"title": "置信度阈值",
|
||||
"description": "提取实体的最小置信度分数(0.0-1.0)。",
|
||||
"default": 0.7,
|
||||
"minimum": 0.0,
|
||||
"maximum": 1.0,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"deduplicate": {
|
||||
"type": "boolean",
|
||||
"title": "去重结果",
|
||||
"description": "移除重复的实体和关系。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"normalize_entities": {
|
||||
"type": "boolean",
|
||||
"title": "规范化实体名称",
|
||||
"description": "规范化实体名称以保持一致性。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"include_context": {
|
||||
"type": "boolean",
|
||||
"title": "包含上下文",
|
||||
"description": "为提取的实体包含周围上下文。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
188
yao/data/kb/providers/fetcher/http/en.json
Normal file
188
yao/data/kb/providers/fetcher/http/en.json
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
{
|
||||
"id": "__yao.http",
|
||||
"title": "HTTP Web Fetcher",
|
||||
"description": "Fetches content from web URLs using HTTP/HTTPS protocols. Supports custom headers, user agent configuration, and timeout settings for reliable web content retrieval.",
|
||||
"required": [],
|
||||
"properties": {
|
||||
"headers": {
|
||||
"type": "object",
|
||||
"title": "Custom Headers",
|
||||
"description": "Custom HTTP headers to include with requests.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 1,
|
||||
"properties": {
|
||||
"Authorization": {
|
||||
"type": "string",
|
||||
"title": "Authorization",
|
||||
"description": "Authorization header for authenticated requests.",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "Bearer token or Basic auth",
|
||||
"width": "full",
|
||||
"order": 1
|
||||
},
|
||||
"Accept": {
|
||||
"type": "string",
|
||||
"title": "Accept",
|
||||
"description": "Accept header to specify preferred content types.",
|
||||
"default": "*/*",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "All Types",
|
||||
"value": "*/*",
|
||||
"description": "Accept any content type",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "HTML",
|
||||
"value": "text/html",
|
||||
"description": "HTML documents only"
|
||||
},
|
||||
{
|
||||
"label": "JSON",
|
||||
"value": "application/json",
|
||||
"description": "JSON data only"
|
||||
},
|
||||
{
|
||||
"label": "XML",
|
||||
"value": "application/xml,text/xml",
|
||||
"description": "XML documents"
|
||||
},
|
||||
{
|
||||
"label": "Plain Text",
|
||||
"value": "text/plain",
|
||||
"description": "Plain text content"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"Accept-Language": {
|
||||
"type": "string",
|
||||
"title": "Accept Language",
|
||||
"description": "Preferred language for content.",
|
||||
"default": "en-US,en;q=0.9",
|
||||
"component": "Input",
|
||||
"placeholder": "en-US,en;q=0.9,zh-CN;q=0.8",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"Referer": {
|
||||
"type": "string",
|
||||
"title": "Referer",
|
||||
"description": "Referer header for the request.",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "https://example.com",
|
||||
"width": "full",
|
||||
"order": 4
|
||||
},
|
||||
"Cookie": {
|
||||
"type": "string",
|
||||
"title": "Cookie",
|
||||
"description": "Cookie header for session management.",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "session=abc123; preference=light",
|
||||
"width": "full",
|
||||
"order": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
"user_agent": {
|
||||
"type": "string",
|
||||
"title": "User Agent",
|
||||
"description": "User agent string to identify the fetcher.",
|
||||
"default": "GraphRAG-Fetcher/1.0",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "Default GraphRAG",
|
||||
"value": "GraphRAG-Fetcher/1.0",
|
||||
"description": "Default GraphRAG fetcher user agent",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "Chrome Desktop",
|
||||
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
|
||||
"description": "Chrome browser on Windows"
|
||||
},
|
||||
{
|
||||
"label": "Firefox Desktop",
|
||||
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0",
|
||||
"description": "Firefox browser on Windows"
|
||||
},
|
||||
{
|
||||
"label": "Safari macOS",
|
||||
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Version/17.0 Safari/537.36",
|
||||
"description": "Safari browser on macOS"
|
||||
},
|
||||
{
|
||||
"label": "Mobile Chrome",
|
||||
"value": "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36",
|
||||
"description": "Chrome browser on Android"
|
||||
},
|
||||
{
|
||||
"label": "Custom",
|
||||
"value": "",
|
||||
"description": "Enter custom user agent below"
|
||||
}
|
||||
],
|
||||
"width": "full",
|
||||
"order": 2
|
||||
},
|
||||
"custom_user_agent": {
|
||||
"type": "string",
|
||||
"title": "Custom User Agent",
|
||||
"description": "Custom user agent string (used when 'Custom' is selected above).",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "Your custom user agent string",
|
||||
"width": "full",
|
||||
"order": 3
|
||||
},
|
||||
"timeout": {
|
||||
"type": "integer",
|
||||
"title": "Timeout (seconds)",
|
||||
"description": "Request timeout in seconds.",
|
||||
"default": 300,
|
||||
"minimum": 5,
|
||||
"maximum": 3600,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"follow_redirects": {
|
||||
"type": "boolean",
|
||||
"title": "Follow Redirects",
|
||||
"description": "Automatically follow HTTP redirects.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"max_redirects": {
|
||||
"type": "integer",
|
||||
"title": "Max Redirects",
|
||||
"description": "Maximum number of redirects to follow.",
|
||||
"default": 10,
|
||||
"minimum": 0,
|
||||
"maximum": 50,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"verify_ssl": {
|
||||
"type": "boolean",
|
||||
"title": "Verify SSL",
|
||||
"description": "Verify SSL certificates for HTTPS requests.",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
}
|
||||
}
|
||||
}
|
||||
188
yao/data/kb/providers/fetcher/http/zh-cn.json
Normal file
188
yao/data/kb/providers/fetcher/http/zh-cn.json
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
{
|
||||
"id": "__yao.http",
|
||||
"title": "HTTP 网络获取器",
|
||||
"description": "使用 HTTP/HTTPS 协议从网络 URL 获取内容。支持自定义头部、用户代理配置和超时设置,用于可靠的网络内容检索。",
|
||||
"required": [],
|
||||
"properties": {
|
||||
"headers": {
|
||||
"type": "object",
|
||||
"title": "自定义头部",
|
||||
"description": "请求中包含的自定义 HTTP 头部。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 1,
|
||||
"properties": {
|
||||
"Authorization": {
|
||||
"type": "string",
|
||||
"title": "授权",
|
||||
"description": "用于身份验证请求的授权头部。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "Bearer token 或 Basic auth",
|
||||
"width": "full",
|
||||
"order": 1
|
||||
},
|
||||
"Accept": {
|
||||
"type": "string",
|
||||
"title": "接受",
|
||||
"description": "指定首选内容类型的接受头部。",
|
||||
"default": "*/*",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "所有类型",
|
||||
"value": "*/*",
|
||||
"description": "接受任何内容类型",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "HTML",
|
||||
"value": "text/html",
|
||||
"description": "仅 HTML 文档"
|
||||
},
|
||||
{
|
||||
"label": "JSON",
|
||||
"value": "application/json",
|
||||
"description": "仅 JSON 数据"
|
||||
},
|
||||
{
|
||||
"label": "XML",
|
||||
"value": "application/xml,text/xml",
|
||||
"description": "XML 文档"
|
||||
},
|
||||
{
|
||||
"label": "纯文本",
|
||||
"value": "text/plain",
|
||||
"description": "纯文本内容"
|
||||
}
|
||||
],
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"Accept-Language": {
|
||||
"type": "string",
|
||||
"title": "接受语言",
|
||||
"description": "内容的首选语言。",
|
||||
"default": "zh-CN,zh;q=0.9,en;q=0.8",
|
||||
"component": "Input",
|
||||
"placeholder": "zh-CN,zh;q=0.9,en-US;q=0.8",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"Referer": {
|
||||
"type": "string",
|
||||
"title": "引用页",
|
||||
"description": "请求的引用页头部。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "https://example.com",
|
||||
"width": "full",
|
||||
"order": 4
|
||||
},
|
||||
"Cookie": {
|
||||
"type": "string",
|
||||
"title": "Cookie",
|
||||
"description": "用于会话管理的 Cookie 头部。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "session=abc123; preference=light",
|
||||
"width": "full",
|
||||
"order": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
"user_agent": {
|
||||
"type": "string",
|
||||
"title": "用户代理",
|
||||
"description": "用于标识获取器的用户代理字符串。",
|
||||
"default": "GraphRAG-Fetcher/1.0",
|
||||
"component": "Select",
|
||||
"enum": [
|
||||
{
|
||||
"label": "默认 GraphRAG",
|
||||
"value": "GraphRAG-Fetcher/1.0",
|
||||
"description": "默认 GraphRAG 获取器用户代理",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"label": "Chrome 桌面版",
|
||||
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
|
||||
"description": "Windows 上的 Chrome 浏览器"
|
||||
},
|
||||
{
|
||||
"label": "Firefox 桌面版",
|
||||
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0",
|
||||
"description": "Windows 上的 Firefox 浏览器"
|
||||
},
|
||||
{
|
||||
"label": "Safari macOS",
|
||||
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Version/17.0 Safari/537.36",
|
||||
"description": "macOS 上的 Safari 浏览器"
|
||||
},
|
||||
{
|
||||
"label": "移动端 Chrome",
|
||||
"value": "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36",
|
||||
"description": "Android 上的 Chrome 浏览器"
|
||||
},
|
||||
{
|
||||
"label": "自定义",
|
||||
"value": "",
|
||||
"description": "在下方输入自定义用户代理"
|
||||
}
|
||||
],
|
||||
"width": "full",
|
||||
"order": 2
|
||||
},
|
||||
"custom_user_agent": {
|
||||
"type": "string",
|
||||
"title": "自定义用户代理",
|
||||
"description": "自定义用户代理字符串(在上方选择\"自定义\"时使用)。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"placeholder": "您的自定义用户代理字符串",
|
||||
"width": "full",
|
||||
"order": 3
|
||||
},
|
||||
"timeout": {
|
||||
"type": "integer",
|
||||
"title": "超时时间(秒)",
|
||||
"description": "请求超时时间,以秒为单位。",
|
||||
"default": 300,
|
||||
"minimum": 5,
|
||||
"maximum": 3600,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"follow_redirects": {
|
||||
"type": "boolean",
|
||||
"title": "跟随重定向",
|
||||
"description": "自动跟随 HTTP 重定向。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"max_redirects": {
|
||||
"type": "integer",
|
||||
"title": "最大重定向次数",
|
||||
"description": "要跟随的最大重定向次数。",
|
||||
"default": 10,
|
||||
"minimum": 0,
|
||||
"maximum": 50,
|
||||
"component": "InputNumber",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"verify_ssl": {
|
||||
"type": "boolean",
|
||||
"title": "验证 SSL",
|
||||
"description": "验证 HTTPS 请求的 SSL 证书。",
|
||||
"default": true,
|
||||
"component": "Switch",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
}
|
||||
}
|
||||
}
|
||||
221
yao/data/kb/providers/fetcher/mcp/en.json
Normal file
221
yao/data/kb/providers/fetcher/mcp/en.json
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
{
|
||||
"id": "__yao.mcp",
|
||||
"title": "MCP Tool Fetcher",
|
||||
"description": "Model Context Protocol (MCP) fetcher that uses external tools for content retrieval. Allows integration with custom fetching tools through the MCP interface.",
|
||||
"required": ["id", "tool"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"title": "MCP Server ID",
|
||||
"description": "Identifier of the MCP server to use for fetching content.",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"tool": {
|
||||
"type": "string",
|
||||
"title": "Tool Name",
|
||||
"description": "Name of the MCP tool to invoke for content fetching.",
|
||||
"default": "fetch",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"arguments_mapping": {
|
||||
"type": "object",
|
||||
"title": "Arguments Mapping",
|
||||
"description": "Mapping of fetch parameters to MCP tool arguments.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 3,
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"title": "URL Argument",
|
||||
"description": "MCP tool argument name for the URL to fetch.",
|
||||
"default": "url",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"method": {
|
||||
"type": "string",
|
||||
"title": "Method Argument",
|
||||
"description": "MCP tool argument name for HTTP method.",
|
||||
"default": "method",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"headers": {
|
||||
"type": "string",
|
||||
"title": "Headers Argument",
|
||||
"description": "MCP tool argument name for HTTP headers.",
|
||||
"default": "headers",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"timeout": {
|
||||
"type": "string",
|
||||
"title": "Timeout Argument",
|
||||
"description": "MCP tool argument name for request timeout.",
|
||||
"default": "timeout",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"user_agent": {
|
||||
"type": "string",
|
||||
"title": "User Agent Argument",
|
||||
"description": "MCP tool argument name for user agent string.",
|
||||
"default": "user_agent",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"follow_redirects": {
|
||||
"type": "string",
|
||||
"title": "Follow Redirects Argument",
|
||||
"description": "MCP tool argument name for redirect following option.",
|
||||
"default": "follow_redirects",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
}
|
||||
}
|
||||
},
|
||||
"result_mapping": {
|
||||
"type": "object",
|
||||
"title": "Result Mapping",
|
||||
"description": "Mapping of MCP tool response fields to fetch results.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 4,
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"title": "Content Field",
|
||||
"description": "Response field containing the fetched content.",
|
||||
"default": "content",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"title": "URL Field",
|
||||
"description": "Response field containing the final URL (after redirects).",
|
||||
"default": "url",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"status_code": {
|
||||
"type": "string",
|
||||
"title": "Status Code Field",
|
||||
"description": "Response field containing the HTTP status code.",
|
||||
"default": "status_code",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"headers": {
|
||||
"type": "string",
|
||||
"title": "Headers Field",
|
||||
"description": "Response field containing the response headers.",
|
||||
"default": "headers",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"content_type": {
|
||||
"type": "string",
|
||||
"title": "Content Type Field",
|
||||
"description": "Response field containing the content type.",
|
||||
"default": "content_type",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"content_length": {
|
||||
"type": "string",
|
||||
"title": "Content Length Field",
|
||||
"description": "Response field containing the content length.",
|
||||
"default": "content_length",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"metadata": {
|
||||
"type": "string",
|
||||
"title": "Metadata Field",
|
||||
"description": "Response field containing additional metadata.",
|
||||
"default": "metadata",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"title": "Error Field",
|
||||
"description": "Response field containing error information.",
|
||||
"default": "error",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
}
|
||||
}
|
||||
},
|
||||
"notification_mapping": {
|
||||
"type": "object",
|
||||
"title": "Notification Mapping",
|
||||
"description": "Mapping for MCP notification handling during fetching.",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 5,
|
||||
"properties": {
|
||||
"progress": {
|
||||
"type": "string",
|
||||
"title": "Progress Notification",
|
||||
"description": "Notification type for fetch progress updates.",
|
||||
"default": "progress",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"title": "Status Notification",
|
||||
"description": "Notification type for status changes.",
|
||||
"default": "status",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"redirect": {
|
||||
"type": "string",
|
||||
"title": "Redirect Notification",
|
||||
"description": "Notification type for redirect events.",
|
||||
"default": "redirect",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"title": "Error Notification",
|
||||
"description": "Notification type for error events.",
|
||||
"default": "error",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
221
yao/data/kb/providers/fetcher/mcp/zh-cn.json
Normal file
221
yao/data/kb/providers/fetcher/mcp/zh-cn.json
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
{
|
||||
"id": "__yao.mcp",
|
||||
"title": "MCP 工具获取器",
|
||||
"description": "模型上下文协议(MCP)获取器,使用外部工具进行内容检索。允许通过 MCP 接口与自定义获取工具集成。",
|
||||
"required": ["id", "tool"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"title": "MCP 服务器 ID",
|
||||
"description": "用于获取内容的 MCP 服务器标识符。",
|
||||
"default": "",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"tool": {
|
||||
"type": "string",
|
||||
"title": "工具名称",
|
||||
"description": "用于内容获取的 MCP 工具名称。",
|
||||
"default": "fetch",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"arguments_mapping": {
|
||||
"type": "object",
|
||||
"title": "参数映射",
|
||||
"description": "获取参数到 MCP 工具参数的映射。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 3,
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"title": "URL 参数",
|
||||
"description": "要获取的 URL 的 MCP 工具参数名称。",
|
||||
"default": "url",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"method": {
|
||||
"type": "string",
|
||||
"title": "方法参数",
|
||||
"description": "HTTP 方法的 MCP 工具参数名称。",
|
||||
"default": "method",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"headers": {
|
||||
"type": "string",
|
||||
"title": "头部参数",
|
||||
"description": "HTTP 头部的 MCP 工具参数名称。",
|
||||
"default": "headers",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"timeout": {
|
||||
"type": "string",
|
||||
"title": "超时参数",
|
||||
"description": "请求超时的 MCP 工具参数名称。",
|
||||
"default": "timeout",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"user_agent": {
|
||||
"type": "string",
|
||||
"title": "用户代理参数",
|
||||
"description": "用户代理字符串的 MCP 工具参数名称。",
|
||||
"default": "user_agent",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"follow_redirects": {
|
||||
"type": "string",
|
||||
"title": "跟随重定向参数",
|
||||
"description": "重定向跟随选项的 MCP 工具参数名称。",
|
||||
"default": "follow_redirects",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
}
|
||||
}
|
||||
},
|
||||
"result_mapping": {
|
||||
"type": "object",
|
||||
"title": "结果映射",
|
||||
"description": "MCP 工具响应字段到获取结果的映射。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 4,
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"title": "内容字段",
|
||||
"description": "包含获取内容的响应字段。",
|
||||
"default": "content",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"title": "URL 字段",
|
||||
"description": "包含最终 URL(重定向后)的响应字段。",
|
||||
"default": "url",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"status_code": {
|
||||
"type": "string",
|
||||
"title": "状态码字段",
|
||||
"description": "包含 HTTP 状态码的响应字段。",
|
||||
"default": "status_code",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"headers": {
|
||||
"type": "string",
|
||||
"title": "头部字段",
|
||||
"description": "包含响应头部的响应字段。",
|
||||
"default": "headers",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
},
|
||||
"content_type": {
|
||||
"type": "string",
|
||||
"title": "内容类型字段",
|
||||
"description": "包含内容类型的响应字段。",
|
||||
"default": "content_type",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 5
|
||||
},
|
||||
"content_length": {
|
||||
"type": "string",
|
||||
"title": "内容长度字段",
|
||||
"description": "包含内容长度的响应字段。",
|
||||
"default": "content_length",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 6
|
||||
},
|
||||
"metadata": {
|
||||
"type": "string",
|
||||
"title": "元数据字段",
|
||||
"description": "包含附加元数据的响应字段。",
|
||||
"default": "metadata",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 7
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"title": "错误字段",
|
||||
"description": "包含错误信息的响应字段。",
|
||||
"default": "error",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 8
|
||||
}
|
||||
}
|
||||
},
|
||||
"notification_mapping": {
|
||||
"type": "object",
|
||||
"title": "通知映射",
|
||||
"description": "获取期间 MCP 通知处理的映射。",
|
||||
"required": false,
|
||||
"component": "Nested",
|
||||
"width": "full",
|
||||
"order": 5,
|
||||
"properties": {
|
||||
"progress": {
|
||||
"type": "string",
|
||||
"title": "进度通知",
|
||||
"description": "获取进度更新的通知类型。",
|
||||
"default": "progress",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 1
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"title": "状态通知",
|
||||
"description": "状态变更的通知类型。",
|
||||
"default": "status",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 2
|
||||
},
|
||||
"redirect": {
|
||||
"type": "string",
|
||||
"title": "重定向通知",
|
||||
"description": "重定向事件的通知类型。",
|
||||
"default": "redirect",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 3
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"title": "错误通知",
|
||||
"description": "错误事件的通知类型。",
|
||||
"default": "error",
|
||||
"component": "Input",
|
||||
"width": "half",
|
||||
"order": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
Loading…
Add table
Reference in a new issue