Langchain-Chatchat

Форк
0
/
tools_select.py 
55 строк · 1.7 Кб
1
from langchain.tools import Tool
2
from server.agent.tools import *
3

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

55
tool_names = [tool.name for tool in tools]
56

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.