Spaces:
Running
Running
File size: 1,567 Bytes
408c946 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
#
# SPDX-FileCopyrightText: Hadad <hadad@linuxmail.org>
# SPDX-License-Identifier: Apache-2.0
#
def construct_tool_definitions():
return [
{
"type": "function",
"function": {
"name": "web_search",
"description": "Perform a web search via SearXNG (Google or Bing) or Baidu.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string"
},
"engine": {
"type": "string",
"enum": [
"google",
"bing",
"baidu"
],
"default": "google",
},
},
"required": ["query"],
},
},
},
{
"type": "function",
"function": {
"name": "read_url",
"description": "Fetch and extract main content from a URL.",
"parameters": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
},
},
"required": ["url"],
},
},
}
] |