jinysun commited on
Commit
b2efd7b
·
verified ·
1 Parent(s): 9fc5f0e

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +10 -8
tools.py CHANGED
@@ -2,7 +2,9 @@ import os
2
 
3
  from langchain_community.agent_toolkits.load_tools import load_tools
4
  from langchain.base_language import BaseLanguageModel
5
-
 
 
6
  from tool import *
7
 
8
 
@@ -50,15 +52,15 @@ def make_tools(llm: BaseLanguageModel, api_keys: dict = {}, verbose=True, image
50
  graphconverter(),
51
  molgen(),
52
  dap_predictor(),
53
- #Scholar2ResultLLM(
54
- # llm=llm,
55
- # openai_api_key=openai_api_key,
56
- # semantic_scholar_api_key=semantic_scholar_api_key ),
57
  ]
58
 
59
- #if serp_api_key:
60
- # all_tools += [WebSearch(serp_api_key)
61
- #]
62
  if image_path is not None:
63
  all_tools += [Imageanalysis(image_path),
64
 
 
2
 
3
  from langchain_community.agent_toolkits.load_tools import load_tools
4
  from langchain.base_language import BaseLanguageModel
5
+ import subprocess
6
+ subprocess.check_call(["pip", "install", "--no-deps", "wikipedia "])
7
+
8
  from tool import *
9
 
10
 
 
52
  graphconverter(),
53
  molgen(),
54
  dap_predictor(),
55
+ Scholar2ResultLLM(
56
+ llm=llm,
57
+ openai_api_key=openai_api_key,
58
+ semantic_scholar_api_key=semantic_scholar_api_key ),
59
  ]
60
 
61
+ if serp_api_key:
62
+ all_tools += [WebSearch(serp_api_key)
63
+ ]
64
  if image_path is not None:
65
  all_tools += [Imageanalysis(image_path),
66