mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-01-19 13:23:16 +08:00
新功能: - 优化 PDF 文件的 OCR,过滤无意义的小图片 by @liunux4odoo #2525 - 支持 Gemini 在线模型 by @yhfgyyf #2630 - 支持 GLM4 在线模型 by @zRzRzRzRzRzRzR - elasticsearch更新https连接 by @xldistance #2390 - 增强对PPT、DOC知识库文件的OCR识别 by @596192804 #2013 - 更新 Agent 对话功能 by @zRzRzRzRzRzRzR - 每次创建对象时从连接池获取连接,避免每次执行方法时都新建连接 by @Lijia0 #2480 - 实现 ChatOpenAI 判断token有没有超过模型的context上下文长度 by @glide-the - 更新运行数据库报错和项目里程碑 by @zRzRzRzRzRzRzR #2659 - 更新配置文件/文档/依赖 by @imClumsyPanda @zRzRzRzRzRzRzR - 添加日文版 readme by @eltociear #2787 修复: - langchain 更新后,PGVector 向量库连接错误 by @HALIndex #2591 - Minimax's model worker 错误 by @xyhshen - ES库无法向量检索.添加mappings创建向量索引 by MSZheng20 #2688
56 lines
1.7 KiB
Python
56 lines
1.7 KiB
Python
from langchain.tools import Tool
|
|
from server.agent.tools import *
|
|
|
|
tools = [
|
|
Tool.from_function(
|
|
func=calculate,
|
|
name="calculate",
|
|
description="Useful for when you need to answer questions about simple calculations",
|
|
args_schema=CalculatorInput,
|
|
),
|
|
Tool.from_function(
|
|
func=arxiv,
|
|
name="arxiv",
|
|
description="A wrapper around Arxiv.org for searching and retrieving scientific articles in various fields.",
|
|
args_schema=ArxivInput,
|
|
),
|
|
Tool.from_function(
|
|
func=weathercheck,
|
|
name="weather_check",
|
|
description="",
|
|
args_schema=WeatherInput,
|
|
),
|
|
Tool.from_function(
|
|
func=shell,
|
|
name="shell",
|
|
description="Use Shell to execute Linux commands",
|
|
args_schema=ShellInput,
|
|
),
|
|
Tool.from_function(
|
|
func=search_knowledgebase_complex,
|
|
name="search_knowledgebase_complex",
|
|
description="Use Use this tool to search local knowledgebase and get information",
|
|
args_schema=KnowledgeSearchInput,
|
|
),
|
|
Tool.from_function(
|
|
func=search_internet,
|
|
name="search_internet",
|
|
description="Use this tool to use bing search engine to search the internet",
|
|
args_schema=SearchInternetInput,
|
|
),
|
|
Tool.from_function(
|
|
func=wolfram,
|
|
name="Wolfram",
|
|
description="Useful for when you need to calculate difficult formulas",
|
|
args_schema=WolframInput,
|
|
),
|
|
Tool.from_function(
|
|
func=search_youtube,
|
|
name="search_youtube",
|
|
description="use this tools to search youtube videos",
|
|
args_schema=YoutubeInput,
|
|
),
|
|
]
|
|
|
|
tool_names = [tool.name for tool in tools]
|