langchain-java icon indicating copy to clipboard operation
langchain-java copied to clipboard

Why do it need the loadTools function?

Open liujunao opened this issue 11 months ago • 0 comments

What if the tool contains multiple different LLMS?

python code example:

llm_math_chain = LLMMathChain(llm=llm, verbose=True)

tools.append(
    Tool.from_function(
        func=llm_math_chain.run,
        name="Calculator",
        description="useful for when you need to answer questions about math",
        args_schema=CalculatorInput
        # coroutine= ... <- you can specify an async method if desired as well
    )
)

liujunao avatar Mar 06 '24 12:03 liujunao