MCPcopy
hub / github.com/SqueezeAILab/LLMCompiler / generate_tools

Function generate_tools

configs/parallelqa_react/tools.py:32–52  ·  view source on GitHub ↗
(args, model_name)

Source from the content-addressed store, hash-verified

30
31
32def generate_tools(args, model_name):
33 llm_math_chain = get_model(
34 model_type=args.model_type,
35 model_name=model_name,
36 vllm_port=args.vllm_port,
37 stream=False,
38 temperature=0,
39 )
40 llm_math_chain = LLMMathChain.from_llm(llm=llm_math_chain, verbose=True)
41 return [
42 Tool(
43 name="Search",
44 func=docstore.search,
45 description="", # not used
46 ),
47 Tool(
48 name="Calculate",
49 func=run_llm_math_chain_factory(llm_math_chain),
50 description="", # not used
51 ),
52 ]

Callers

nothing calls this directly

Calls 4

get_modelFunction · 0.90
ToolClass · 0.90
from_llmMethod · 0.80

Tested by

no test coverage detected