Skip to content

Commit

Permalink
docs:restore commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
dongjing007 committed Oct 20, 2023
1 parent 630e563 commit 45abf28
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions xiaogpt/langchain/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
from langchain.agents import AgentType
from langchain.tools import BaseTool
from langchain.llms import OpenAI

# from langchain.chains import LLMMathChain
from langchain.chains import LLMMathChain
from langchain.utilities import SerpAPIWrapper
from langchain.chat_models import ChatOpenAI
from langchain.memory import ChatMessageHistory
Expand All @@ -25,13 +24,13 @@ def agent_search(query):

# Initialization: search chain, mathematical calculation chain, custom summary email chain
search = SerpAPIWrapper()
# llm_math_chain = LLMMathChain.from_llm(llm=llm, verbose=False)
llm_math_chain = LLMMathChain.from_llm(llm=llm, verbose=False)
mail_summary = MailSummaryTool()

# Tool list: search, mathematical calculations, custom summary emails
tools = [
Tool(name="Search", func=search.run, description="如果你不知道或不确定答案,可以使用这个搜索引擎检索答案"),
# Tool(name="Calculator", func=llm_math_chain.run, description="在需要回答数学问题时非常有用"),
Tool(name="Calculator", func=llm_math_chain.run, description="在需要回答数学问题时非常有用"),
Tool(
name="MailSummary",
func=mail_summary.run,
Expand Down

0 comments on commit 45abf28

Please sign in to comment.