File size: 12,355 Bytes
a80f6e6 | 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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | import sys
from pathlib import Path
SEARCH_TOOL_FEAT_TABLE = {
"Tavily Search": {
"pricing": "1000 free searches/month",
"available_data": "URL, Content, Title, Images, Answer",
"link": "/docs/integrations/tools/tavily_search",
},
"Exa Search": {
"pricing": "1000 free searches/month",
"available_data": "URL, Author, Title, Published Date",
"link": "/docs/integrations/tools/exa_search",
},
"Bing Search": {
"pricing": "Paid",
"available_data": "URL, Snippet, Title",
"link": "/docs/integrations/tools/bing_search",
},
"DuckDuckgoSearch": {
"pricing": "Free",
"available_data": "URL, Snippet, Title",
"link": "/docs/integrations/tools/ddg",
},
"Brave Search": {
"pricing": "Free",
"available_data": "URL, Snippet, Title",
"link": "/docs/integrations/tools/brave_search",
},
"Google Search": {
"pricing": "Paid",
"available_data": "URL, Snippet, Title",
"link": "/docs/integrations/tools/google_search",
},
"Google Serper": {
"pricing": "Free",
"available_data": "URL, Snippet, Title, Search Rank, Site Links",
"link": "/docs/integrations/tools/google_serper",
},
"Mojeek Search": {
"pricing": "Paid",
"available_data": "URL, Snippet, Title",
"link": "/docs/integrations/tools/mojeek_search",
},
"SearxNG Search": {
"pricing": "Free",
"available_data": "URL, Snippet, Title, Category",
"link": "/docs/integrations/tools/searx_search",
},
"You.com Search": {
"pricing": "Free for 60 days",
"available_data": "URL, Title, Page Content",
"link": "/docs/integrations/tools/you",
},
"SearchApi": {
"pricing": "100 Free Searches on Sign Up",
"available_data": "URL, Snippet, Title, Search Rank, Site Links, Authors",
"link": "/docs/integrations/tools/searchapi",
},
"SerpAPI": {
"pricing": "100 Free Searches/Month",
"available_data": "Answer",
"link": "/docs/integrations/tools/serpapi",
},
"Jina Search": {
"pricing": "1M Response Tokens Free",
"available_data": "URL, Snippet, Title, Page Content",
"link": "/docs/integrations/tools/jina_search/",
},
}
CODE_INTERPRETER_TOOL_FEAT_TABLE = {
"Bearly Code Interpreter": {
"langauges": "Python",
"sandbox_lifetime": "Resets on Execution",
"upload": True,
"return_results": "Text",
"link": "/docs/integrations/tools/bearly",
"self_hosting": False,
},
"Riza Code Interpreter": {
"langauges": "Python, JavaScript, PHP, Ruby",
"sandbox_lifetime": "Resets on Execution",
"upload": True,
"return_results": "Text",
"link": "/docs/integrations/tools/riza",
"self_hosting": True,
},
"Azure Container Apps dynamic sessions": {
"langauges": "Python",
"sandbox_lifetime": "1 Hour",
"upload": True,
"return_results": "Text, Images",
"link": "/docs/integrations/tools/azure_dynamic_sessions",
"self_hosting": False,
},
}
PRODUCTIVITY_TOOL_FEAT_TABLE = {
"Gmail Toolkit": {
"link": "/docs/integrations/tools/gmail",
"pricing": "Free, with limit of 250 quota units per user per second",
},
"Github Toolkit": {
"link": "/docs/integrations/tools/github",
"pricing": "Free",
},
"Gitlab Toolkit": {
"link": "/docs/integrations/tools/gitlab",
"pricing": "Free for personal project",
},
"Slack Toolkit": {
"link": "/docs/integrations/tools/slack",
"pricing": "Free",
},
"Jira Toolkit": {
"link": "/docs/integrations/tools/jira",
"pricing": "Free, with [rate limits](https://developer.atlassian.com/cloud/jira/platform/rate-limiting/)",
},
"Office365 Toolkit": {
"link": "/docs/integrations/tools/office365",
"pricing": "Free with Office365, includes [rate limits](https://learn.microsoft.com/en-us/graph/throttling-limits)",
},
"Twilio Tool": {
"link": "/docs/integrations/tools/twilio",
"pricing": "Free trial, with [pay-as-you-go pricing](https://www.twilio.com/en-us/pricing) after",
},
"Infobip Tool": {
"link": "/docs/integrations/tools/infobip",
"pricing": "Free trial, with variable pricing after",
},
}
WEBBROWSING_TOOL_FEAT_TABLE = {
"Requests Toolkit": {
"link": "/docs/integrations/tools/requests",
"interactions": False,
"pricing": "Free",
},
"PlayWright Browser Toolkit": {
"link": "/docs/integrations/tools/playwright",
"interactions": True,
"pricing": "Free",
},
"MultiOn Toolkit": {
"link": "/docs/integrations/tools/multion",
"interactions": True,
"pricing": "40 free requests/day",
},
"AgentQL Toolkit": {
"link": "/docs/integrations/tools/agentql",
"interactions": True,
"pricing": "Free trial, with pay-as-you-go and flat rate plans after",
},
}
DATABASE_TOOL_FEAT_TABLE = {
"SQLDatabase Toolkit": {
"link": "/docs/integrations/tools/sql_database",
"operations": "Any SQL operation",
},
"Spark SQL Toolkit": {
"link": "/docs/integrations/tools/spark_sql",
"operations": "Any SQL operation",
},
"Cassandra Database Toolkit": {
"link": "/docs/integrations/tools/cassandra_database",
"operations": "SELECT and schema introspection",
},
}
FINANCE_TOOL_FEAT_TABLE = {
"GOAT": {
"link": "/docs/integrations/tools/goat",
"pricing": "Free",
"capabilities": "Create and receive payments, purchase physical goods, make investments, and more.",
},
}
TOOLS_TEMPLATE = """\
---
sidebar_position: 0
sidebar_class_name: hidden
keywords: [compatibility]
custom_edit_url:
---
# Tools
[Tools](/docs/concepts/tools) are utilities designed to be called by a model: their inputs are designed to be generated by models, and their outputs are designed to be passed back to models.
A [toolkit](/docs/concepts/tools/#toolkits) is a collection of tools meant to be used together.
:::info
If you'd like to write your own tool, see [this how-to](/docs/how_to/custom_tools/).
If you'd like to contribute an integration, see [Contributing integrations](/docs/contributing/how_to/integrations/).
:::
## Search
The following table shows tools that execute online searches in some shape or form:
{search_table}
## Code Interpreter
The following table shows tools that can be used as code interpreters:
{code_interpreter_table}
## Productivity
The following table shows tools that can be used to automate tasks in productivity tools:
{productivity_table}
## Web Browsing
The following table shows tools that can be used to automate tasks in web browsers:
{webbrowsing_table}
## Database
The following table shows tools that can be used to automate tasks in databases:
{database_table}
## Finance
The following table shows tools that can be used to execute financial transactions such as payments, purchases, and more:
{finance_table}
## All tools
import {{ IndexTable }} from "@theme/FeatureTables";
<IndexTable />
""" # noqa: E501
def get_productivity_table() -> str:
"""Get the table of productivity tools."""
header = [
"tool",
"pricing",
]
title = [
"Tool/Toolkit",
"Pricing",
]
rows = [title, [":-"] + [":-:"] * (len(title) - 1)]
for productivity_tool, feats in sorted(PRODUCTIVITY_TOOL_FEAT_TABLE.items()):
# Fields are in the order of the header
row = [
f"[{productivity_tool}]({feats['link']})",
]
for h in header[1:]:
row.append(feats.get(h))
rows.append(row)
return "\n".join(["|".join(row) for row in rows])
def get_webbrowsing_table() -> str:
"""Get the table of web browsing tools."""
header = ["tool", "pricing", "interactions"]
title = ["Tool/Toolkit", "Pricing", "Supports Interacting with the Browser"]
rows = [title, [":-"] + [":-:"] * (len(title) - 1)]
for web_browsing_tool, feats in sorted(WEBBROWSING_TOOL_FEAT_TABLE.items()):
# Fields are in the order of the header
row = [
f"[{web_browsing_tool}]({feats['link']})",
]
for h in header[1:]:
value = feats.get(h)
if h == "interactions":
if value is True:
row.append("✅")
else:
row.append("❌")
else:
row.append(value)
rows.append(row)
return "\n".join(["|".join(row) for row in rows])
def get_database_table() -> str:
"""Get the table of database tools."""
header = ["tool", "operations"]
title = ["Tool/Toolkit", "Allowed Operations"]
rows = [title, [":-"] + [":-:"] * (len(title) - 1)]
for database_tool, feats in sorted(DATABASE_TOOL_FEAT_TABLE.items()):
# Fields are in the order of the header
row = [
f"[{database_tool}]({feats['link']})",
]
for h in header[1:]:
row.append(feats.get(h))
rows.append(row)
return "\n".join(["|".join(row) for row in rows])
def get_finance_table() -> str:
"""Get the table of finance tools."""
header = ["tool", "pricing", "capabilities"]
title = ["Tool/Toolkit", "Pricing", "Capabilities"]
rows = [title, [":-"] + [":-:"] * (len(title) - 1)]
for finance_tool, feats in sorted(FINANCE_TOOL_FEAT_TABLE.items()):
# Fields are in the order of the header
row = [
f"[{finance_tool}]({feats['link']})",
]
for h in header[1:]:
row.append(feats.get(h))
rows.append(row)
return "\n".join(["|".join(row) for row in rows])
def get_search_tools_table() -> str:
"""Get the table of search tools."""
header = ["tool", "pricing", "available_data"]
title = ["Tool/Toolkit", "Free/Paid", "Return Data"]
rows = [title, [":-"] + [":-:"] * (len(title) - 1)]
for search_tool, feats in sorted(SEARCH_TOOL_FEAT_TABLE.items()):
# Fields are in the order of the header
row = [
f"[{search_tool}]({feats['link']})",
]
for h in header[1:]:
row.append(feats.get(h))
rows.append(row)
return "\n".join(["|".join(row) for row in rows])
def get_code_interpreter_table() -> str:
"""Get the table of code interpreter tools."""
header = [
"tool",
"langauges",
"sandbox_lifetime",
"upload",
"return_results",
"self_hosting",
]
title = [
"Tool/Toolkit",
"Supported Languages",
"Sandbox Lifetime",
"Supports File Uploads",
"Return Types",
"Supports Self-Hosting",
]
rows = [title, [":-"] + [":-:"] * (len(title) - 1)]
for search_tool, feats in sorted(CODE_INTERPRETER_TOOL_FEAT_TABLE.items()):
# Fields are in the order of the header
row = [
f"[{search_tool}]({feats['link']})",
]
for h in header[1:]:
value = feats.get(h)
if h == "upload" or h == "self_hosting":
if value is True:
row.append("✅")
else:
row.append("❌")
else:
row.append(value)
rows.append(row)
return "\n".join(["|".join(row) for row in rows])
if __name__ == "__main__":
output_dir = Path(sys.argv[1])
output_integrations_dir = output_dir / "integrations"
output_integrations_dir_tools = output_integrations_dir / "tools"
output_integrations_dir_tools.mkdir(parents=True, exist_ok=True)
tools_page = TOOLS_TEMPLATE.format(
search_table=get_search_tools_table(),
code_interpreter_table=get_code_interpreter_table(),
productivity_table=get_productivity_table(),
webbrowsing_table=get_webbrowsing_table(),
database_table=get_database_table(),
finance_table=get_finance_table(),
)
with open(output_integrations_dir / "tools" / "index.mdx", "w") as f:
f.write(tools_page)
|