2024-07-11
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
The tools in Dify are divided into built-in tools (hard-coded) and third-party tools (OpenAPI Swagger/ChatGPT Plugin). Tools can be used by Workflows and Agents. Of course, Workflows can also be published as tools, so that Workflows can use Workflows (tools) in Workflows (workflows).
Let's take Google as an example. From the front end, you only need to enter the SerpApi API key. Next, we will focus on analyzing the back end implementation.
Source code location: dify-0.6.9/api/core/tools/provider/builtin/google
Source code location: dify-0.6.9/api/core/tools/provider/builtin/google/google.yaml
identity: # 工具供应商的基本信息
author: Dify # 作者
name: google # 工具供应商的名称,名称是唯一的,不允许和其它供应商重名
label: # 标签用于前端展示
en_US: Google # 英文标签
zh_Hans: Google # 简体中文标签
pt_BR: Google # 葡萄牙语标签
description: # 描述用于前端展示
en_US: Google # 英文描述
zh_Hans: GoogleSearch # 简体中文描述
pt_BR: Google # 葡萄牙语描述
icon: icon.svg # 图标文件名,图标文件需要放在当前模块的_assets目录下