samim2024 commited on
Commit
36ccd01
·
verified ·
1 Parent(s): d7d0ef3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -18,8 +18,14 @@ from langchain.tools import BaseTool, StructuredTool, Tool, tool,DuckDuckGoSearc
18
  from langchain import LLMMathChain
19
  from pydantic import BaseModel, Field
20
  from langchain.tools import DuckDuckGoSearchRun
 
 
 
 
 
 
21
 
22
- search=DuckDuckGoSearchRun()
23
  llm = HuggingFaceEndpoint(repo_id="mistralai/Mistral-7B-Instruct-v0.2")
24
 
25
  # Fetch stock data from Yahoo Finance
@@ -160,6 +166,7 @@ tools=[
160
  func=get_stock_price,
161
  description="Use when you are asked to evaluate or analyze a stock. This will output historic share price data. You should input the the stock ticker to it "
162
  ),
 
163
  Tool(
164
  name="DuckDuckGo Search",
165
  func=search.run,
 
18
  from langchain import LLMMathChain
19
  from pydantic import BaseModel, Field
20
  from langchain.tools import DuckDuckGoSearchRun
21
+ search = SerpAPIWrapper(serpapi_api_key='a8845c74bc619b37a2d2c338489ef8d2187e053b3bd38280aac8165b927a7267')
22
+ t2 = Tool.from_function(
23
+ name="Google Search",
24
+ func=search.run,
25
+ description='Useful for when you are asked to perform internet search '
26
+ )
27
 
28
+ #search=DuckDuckGoSearchRun()
29
  llm = HuggingFaceEndpoint(repo_id="mistralai/Mistral-7B-Instruct-v0.2")
30
 
31
  # Fetch stock data from Yahoo Finance
 
166
  func=get_stock_price,
167
  description="Use when you are asked to evaluate or analyze a stock. This will output historic share price data. You should input the the stock ticker to it "
168
  ),
169
+
170
  Tool(
171
  name="DuckDuckGo Search",
172
  func=search.run,