1- INSERT INTO tool (create_time, update_time, id, name, label, " desc" , code, input_field_list, init_field_list, icon, is_active, scope, tool_type, template_id, workspace_id, init_params, user_id, folder_id) VALUES (' 2025-03-10 06:20:35.945414 +00:00' , ' 2025-03-10 09:19:23.608026 +00:00' , ' c75cb48e-fd77-11ef-84d2-5618c4394482' , ' 博查搜索' , ' Web Search ' , ' 从博查搜索任何信息和网页URL' , e' def bocha_search(query, apikey):
1+ INSERT INTO tool (create_time, update_time, id, name, label, " desc" , code, input_field_list, init_field_list, icon, is_active, scope, tool_type, template_id, workspace_id, init_params, user_id, folder_id) VALUES (' 2025-03-10 06:20:35.945414 +00:00' , ' 2025-03-10 09:19:23.608026 +00:00' , ' c75cb48e-fd77-11ef-84d2-5618c4394482' , ' 博查搜索' , ' web_search ' , ' 从博查搜索任何信息和网页URL' , e' def bocha_search(query, apikey):
22 import requests
33 import json
44 url = "https://api.bochaai.com/v1/web-search"
@@ -19,7 +19,7 @@ INSERT INTO tool (create_time, update_time, id, name, label, "desc", code, input
1919 else:
2020 raise Exception(f"API请求失败: {response.status_code}, 错误信息: {response.text}")
2121 return (response.text)' , ' [{"name": "query", "type": "string", "source": "reference", "is_required": true}]' , ' [{"attrs": {"type": "password", "maxlength": 200, "minlength": 1, "show-password": true, "show-word-limit": true}, "field": "apikey", "label": "API Key", "required": true, "input_type": "PasswordInput", "props_info": {"rules": [{"message": "API Key 为必填属性", "required": true}, {"max": 200, "min": 1, "message": "API Key 长度在 1 到 200 个字符", "trigger": "blur"}]}, "default_value": "x", "show_default_value": false}]' , ' /ui/tool/bochaai/icon.png' , true, ' INTERNAL' , ' INTERNAL' , null , ' None' , ' ' , ' f0dd8f71-e4ee-11ee-8c84-a8a1595801ab' , ' default' );
22- INSERT INTO tool (create_time, update_time, id, name, label, " desc" , code, input_field_list, init_field_list, icon, is_active, scope, tool_type, template_id, workspace_id, init_params, user_id, folder_id) VALUES (' 2025-02-26 03:36:48.187286 +00:00' , ' 2025-03-11 07:23:46.123972 +00:00' , ' e89ad2ae-f3f2-11ef-ad09-0242ac110002' , ' Google Search' ,' Web Search ' , ' Google Web Search' , e' def google_search(query, apikey, cx):
22+ INSERT INTO tool (create_time, update_time, id, name, label, " desc" , code, input_field_list, init_field_list, icon, is_active, scope, tool_type, template_id, workspace_id, init_params, user_id, folder_id) VALUES (' 2025-02-26 03:36:48.187286 +00:00' , ' 2025-03-11 07:23:46.123972 +00:00' , ' e89ad2ae-f3f2-11ef-ad09-0242ac110002' , ' Google Search' ,' web_search ' , ' Google Web Search' , e' def google_search(query, apikey, cx):
2323 import requests
2424 import json
2525 url = "https://customsearch.googleapis.com/customsearch/v1"
@@ -36,7 +36,7 @@ INSERT INTO tool (create_time, update_time, id, name, label, "desc", code, input
3636 else:
3737 raise Exception(f"API请求失败: {response.status_code}, 错误信息: {response.text}")
3838 return (response.text)', '[{"name": "query", "type": "string", "source": "reference", "is_required": true}]', '[{"attrs": {"type": "password", "maxlength": 200, "minlength": 1, "show-password": true, "show-word-limit": true}, "field": "apikey", "label": "API Key", "required": true, "input_type": "PasswordInput", "props_info": {"rules": [{"message": "API Key 为必填属性", "required": true}, {"max": 200, "min": 1, "message": "API Key 长度在 1 到 200 个字符", "trigger": "blur"}]}, "default_value": "x", "show_default_value": false}, {"attrs": {"maxlength": 200, "minlength": 1, "show-word-limit": true}, "field": "cx", "label": "cx", "required": true, "input_type": "TextInput", "props_info": {"rules": [{"message": "cx 为必填属性", "required": true}, {"max": 200, "min": 1, "message": "cx长度在 1 到 200 个字符", "trigger": "blur"}]}, "default_value": "x", "show_default_value": false}]', '/ui/tool/google_search/icon.png', true, 'INTERNAL', 'INTERNAL', null, 'None', '', 'f0dd8f71-e4ee-11ee-8c84-a8a1595801ab', 'default');
39- INSERT INTO tool (create_time, update_time, id, name, label, "desc", code, input_field_list, init_field_list, icon, is_active, scope, tool_type, template_id, workspace_id, init_params, user_id, folder_id) VALUES (' 2025 - 02 - 25 07 :44 :40 .141515 + 00 :00 ' , ' 2025 - 03 - 11 06 :33 :53 .248495 + 00 :00 ' , ' 5e912f00- f34c- 11ef- 8a9c- 5618c4394482' , ' LangSearch' ,' Web Search ' , e' A Web Search tool supporting natural language search
39+ INSERT INTO tool (create_time, update_time, id, name, label, "desc", code, input_field_list, init_field_list, icon, is_active, scope, tool_type, template_id, workspace_id, init_params, user_id, folder_id) VALUES (' 2025 - 02 - 25 07 :44 :40 .141515 + 00 :00 ' , ' 2025 - 03 - 11 06 :33 :53 .248495 + 00 :00 ' , ' 5e912f00- f34c- 11ef- 8a9c- 5618c4394482' , ' LangSearch' ,' web_search ' , e' A Web Search tool supporting natural language search
4040' , e'
4141def langsearch(query, apikey):
4242 import json
@@ -61,7 +61,7 @@ def langsearch(query, apikey):
6161 else:
6262 raise Exception(f" API请求失败: {response.status_code}, 错误信息: {response.text}" )
6363 return (response .text )' , ' [{" name" : " query" , " type" : " string" , " source" : " reference" , " is_required" : true}]' , ' [{" attrs" : {" type" : " password" , " maxlength" : 200 , " minlength" : 1 , " show-password" : true, " show-word-limit" : true}, " field" : " apikey" , " label" : " API Key" , " required" : true, " input_type" : " PasswordInput" , " props_info" : {" rules" : [{" message" : " API Key 为必填属性" , " required" : true}, {" max" : 200 , " min" : 1 , " message" : " API Key 长度在 1 到 200 个字符" , " trigger" : " blur" }]}, " default_value" : " x" , " show_default_value" : false}]' , ' / ui/ tool/ langsearch/ icon .png ' , true, ' INTERNAL' , ' INTERNAL' , null, ' None' , ' ' , ' f0dd8f71- e4ee- 11ee- 8c84- a8a1595801ab' , ' default' );
64- INSERT INTO tool (create_time, update_time, id, name, label, "desc", code, input_field_list, init_field_list, icon, is_active, scope, tool_type, template_id, workspace_id, init_params, user_id, folder_id) VALUES (' 2025 - 03 - 17 08 :16 :32 .626245 + 00 :00 ' , ' 2025 - 03 - 17 08 :16 :32 .626308 + 00 :00 ' , ' 22c21b76- 0308 - 11f0- 9694 - 5618c4394482' , ' MySQL 查询' ,' Database Search ' , ' 一个连接MySQL数据库执行SQL查询的工具' , e'
64+ INSERT INTO tool (create_time, update_time, id, name, label, "desc", code, input_field_list, init_field_list, icon, is_active, scope, tool_type, template_id, workspace_id, init_params, user_id, folder_id) VALUES (' 2025 - 03 - 17 08 :16 :32 .626245 + 00 :00 ' , ' 2025 - 03 - 17 08 :16 :32 .626308 + 00 :00 ' , ' 22c21b76- 0308 - 11f0- 9694 - 5618c4394482' , ' MySQL 查询' ,' database_search ' , ' 一个连接MySQL数据库执行SQL查询的工具' , e'
6565def query_mysql(host,port, user, password, database, sql):
6666 import pymysql
6767 import json
@@ -103,7 +103,7 @@ def query_mysql(host,port, user, password, database, sql):
103103 except Exception as e:
104104 print(f" Error while connecting to MySQL: {e}" )
105105 raise e', '[{"name": "sql", "type": "string", "source": "reference", "is_required": true}]', '[{"attrs": {"maxlength": 200, "minlength": 1, "show-word-limit": true}, "field": "host", "label": "host", "required": true, "input_type": "TextInput", "props_info": {"rules": [{"message": "host 为必填属性", "required": true}, {"max": 200, "min": 1, "message": "host长度在 1 到 200 个字符", "trigger": "blur"}]}, "default_value": "x", "show_default_value": false}, {"attrs": {"maxlength": 20, "minlength": 1, "show-word-limit": true}, "field": "port", "label": "port", "required": true, "input_type": "TextInput", "props_info": {"rules": [{"message": "port 为必填属性", "required": true}, {"max": 20, "min": 1, "message": "port长度在 1 到 20 个字符", "trigger": "blur"}]}, "default_value": "3306", "show_default_value": false}, {"attrs": {"maxlength": 200, "minlength": 1, "show-word-limit": true}, "field": "user", "label": "user", "required": true, "input_type": "TextInput", "props_info": {"rules": [{"message": "user 为必填属性", "required": true}, {"max": 200, "min": 1, "message": "user长度在 1 到 200 个字符", "trigger": "blur"}]}, "default_value": "root", "show_default_value": false}, {"attrs": {"type": "password", "maxlength": 200, "minlength": 1, "show-password": true, "show-word-limit": true}, "field": "password", "label": "password", "required": true, "input_type": "PasswordInput", "props_info": {"rules": [{"message": "password 为必填属性", "required": true}, {"max": 200, "min": 1, "message": "password长度在 1 到 200 个字符", "trigger": "blur"}]}, "default_value": "x", "show_default_value": false}, {"attrs": {"maxlength": 200, "minlength": 1, "show-word-limit": true}, "field": "database", "label": "database", "required": true, "input_type": "TextInput", "props_info": {"rules": [{"message": "database 为必填属性", "required": true}, {"max": 200, "min": 1, "message": "database长度在 1 到 200 个字符", "trigger": "blur"}]}, "default_value": "x", "show_default_value": false}]', '/ui/tool/mysql/icon.png', true, 'INTERNAL', 'INTERNAL', null, 'None', null, 'f0dd8f71-e4ee-11ee-8c84-a8a1595801ab', 'default');
106- INSERT INTO tool (create_time, update_time, id, name, label, " desc" , code, input_field_list, init_field_list, icon, is_active, scope, tool_type, template_id, workspace_id, init_params, user_id, folder_id) VALUES (' 2025-03-17 07:37:54.620836 +00:00' , ' 2025-03-17 07:37:54.620887 +00:00' , ' bd1e8b88-0302-11f0-87bb-5618c4394482' , ' PostgreSQL 查询' ,' Database Search ' , ' 一个连接PostgreSQL数据库执行SQL查询的工具' , e'
106+ INSERT INTO tool (create_time, update_time, id, name, label, " desc" , code, input_field_list, init_field_list, icon, is_active, scope, tool_type, template_id, workspace_id, init_params, user_id, folder_id) VALUES (' 2025-03-17 07:37:54.620836 +00:00' , ' 2025-03-17 07:37:54.620887 +00:00' , ' bd1e8b88-0302-11f0-87bb-5618c4394482' , ' PostgreSQL 查询' ,' database_search ' , ' 一个连接PostgreSQL数据库执行SQL查询的工具' , e'
107107def queryPgSQL(database, user, password, host, port, query):
108108 import psycopg2
109109 import json
0 commit comments