|
|
|
@ -2304,18 +2304,18 @@ list_tool.run({})
|
|
|
|
|
###########=========================>
|
|
|
|
|
|
|
|
|
|
#======> Calculator
|
|
|
|
|
# from langchain import LLMMathChain
|
|
|
|
|
|
|
|
|
|
# llm_math_chain = LLMMathChain.from_llm(llm=llm, verbose=True)
|
|
|
|
|
# math_tool = Tool(
|
|
|
|
|
# name="Calculator",
|
|
|
|
|
# func=llm_math_chain.run,
|
|
|
|
|
# description="useful for when you need to answer questions about math"
|
|
|
|
|
# ),
|
|
|
|
|
|
|
|
|
|
# #####==========================================================================> TOOLS
|
|
|
|
|
# from langchain.tools.human.tool import HumanInputRun
|
|
|
|
|
# from langchain.tools import BaseTool, DuckDuckGoSearchRun
|
|
|
|
|
from langchain import LLMMathChain
|
|
|
|
|
|
|
|
|
|
llm_math_chain = LLMMathChain.from_llm(llm=llm, verbose=True)
|
|
|
|
|
math_tool = Tool(
|
|
|
|
|
name="Calculator",
|
|
|
|
|
func=llm_math_chain.run,
|
|
|
|
|
description="useful for when you need to answer questions about math"
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
#####==========================================================================> TOOLS
|
|
|
|
|
from langchain.tools.human.tool import HumanInputRun
|
|
|
|
|
from langchain.tools import BaseTool, DuckDuckGoSearchRun
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|