Langchain-Chatchat
55 строк · 1.7 Кб
1from langchain.tools import Tool
2from server.agent.tools import *
3
4tools = [
5Tool.from_function(
6func=calculate,
7name="calculate",
8description="Useful for when you need to answer questions about simple calculations",
9args_schema=CalculatorInput,
10),
11Tool.from_function(
12func=arxiv,
13name="arxiv",
14description="A wrapper around Arxiv.org for searching and retrieving scientific articles in various fields.",
15args_schema=ArxivInput,
16),
17Tool.from_function(
18func=weathercheck,
19name="weather_check",
20description="",
21args_schema=WeatherInput,
22),
23Tool.from_function(
24func=shell,
25name="shell",
26description="Use Shell to execute Linux commands",
27args_schema=ShellInput,
28),
29Tool.from_function(
30func=search_knowledgebase_complex,
31name="search_knowledgebase_complex",
32description="Use Use this tool to search local knowledgebase and get information",
33args_schema=KnowledgeSearchInput,
34),
35Tool.from_function(
36func=search_internet,
37name="search_internet",
38description="Use this tool to use bing search engine to search the internet",
39args_schema=SearchInternetInput,
40),
41Tool.from_function(
42func=wolfram,
43name="Wolfram",
44description="Useful for when you need to calculate difficult formulas",
45args_schema=WolframInput,
46),
47Tool.from_function(
48func=search_youtube,
49name="search_youtube",
50description="use this tools to search youtube videos",
51args_schema=YoutubeInput,
52),
53]
54
55tool_names = [tool.name for tool in tools]
56