feat: Add DataSchema tool for retrieving schema information from CSV and Excel files
This commit is contained in:
@@ -1,5 +1,21 @@
|
||||
package tools
|
||||
|
||||
// Tool names constants
|
||||
const (
|
||||
ToolThinking = "thinking"
|
||||
ToolTodoWrite = "todo_write"
|
||||
ToolGrepChunks = "grep_chunks"
|
||||
ToolKnowledgeSearch = "knowledge_search"
|
||||
ToolListKnowledgeChunks = "list_knowledge_chunks"
|
||||
ToolQueryKnowledgeGraph = "query_knowledge_graph"
|
||||
ToolGetDocumentInfo = "get_document_info"
|
||||
ToolDatabaseQuery = "database_query"
|
||||
ToolDataAnalysis = "data_analysis"
|
||||
ToolDataSchema = "data_schema"
|
||||
ToolWebSearch = "web_search"
|
||||
ToolWebFetch = "web_fetch"
|
||||
)
|
||||
|
||||
// AvailableTool defines a simple tool metadata used by settings APIs.
|
||||
type AvailableTool struct {
|
||||
Name string `json:"name"`
|
||||
@@ -11,27 +27,31 @@ type AvailableTool struct {
|
||||
// Keep this in sync with registered tools in this package.
|
||||
func AvailableToolDefinitions() []AvailableTool {
|
||||
return []AvailableTool{
|
||||
{Name: "thinking", Label: "思考", Description: "动态和反思性的问题解决思考工具"},
|
||||
{Name: "todo_write", Label: "制定计划", Description: "创建结构化的研究计划"},
|
||||
{Name: "grep_chunks", Label: "关键词搜索", Description: "快速定位包含特定关键词的文档和分块"},
|
||||
{Name: "knowledge_search", Label: "语义搜索", Description: "理解问题并查找语义相关内容"},
|
||||
{Name: "list_knowledge_chunks", Label: "查看文档分块", Description: "获取文档完整分块内容"},
|
||||
{Name: "query_knowledge_graph", Label: "查询知识图谱", Description: "从知识图谱中查询关系"},
|
||||
{Name: "get_document_info", Label: "获取文档信息", Description: "查看文档元数据"},
|
||||
{Name: "database_query", Label: "查询数据库", Description: "查询数据库中的信息"},
|
||||
{Name: ToolThinking, Label: "思考", Description: "动态和反思性的问题解决思考工具"},
|
||||
{Name: ToolTodoWrite, Label: "制定计划", Description: "创建结构化的研究计划"},
|
||||
{Name: ToolGrepChunks, Label: "关键词搜索", Description: "快速定位包含特定关键词的文档和分块"},
|
||||
{Name: ToolKnowledgeSearch, Label: "语义搜索", Description: "理解问题并查找语义相关内容"},
|
||||
{Name: ToolListKnowledgeChunks, Label: "查看文档分块", Description: "获取文档完整分块内容"},
|
||||
{Name: ToolQueryKnowledgeGraph, Label: "查询知识图谱", Description: "从知识图谱中查询关系"},
|
||||
{Name: ToolGetDocumentInfo, Label: "获取文档信息", Description: "查看文档元数据"},
|
||||
{Name: ToolDatabaseQuery, Label: "查询数据库", Description: "查询数据库中的信息"},
|
||||
{Name: ToolDataAnalysis, Label: "数据分析", Description: "理解数据文件并进行数据分析"},
|
||||
{Name: ToolDataSchema, Label: "查看数据元信息", Description: "获取表格文件的元信息"},
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultAllowedTools returns the default allowed tools list.
|
||||
func DefaultAllowedTools() []string {
|
||||
return []string{
|
||||
"thinking",
|
||||
"todo_write",
|
||||
"knowledge_search",
|
||||
"grep_chunks",
|
||||
"list_knowledge_chunks",
|
||||
"query_knowledge_graph",
|
||||
"get_document_info",
|
||||
"database_query",
|
||||
ToolThinking,
|
||||
ToolTodoWrite,
|
||||
ToolKnowledgeSearch,
|
||||
ToolGrepChunks,
|
||||
ToolListKnowledgeChunks,
|
||||
ToolQueryKnowledgeGraph,
|
||||
ToolGetDocumentInfo,
|
||||
ToolDatabaseQuery,
|
||||
ToolDataAnalysis,
|
||||
ToolDataSchema,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user