HamaWhiteGG / langchain-java

Java version of LangChain, while empowering LLM for Big Data.
Apache License 2.0
545 stars 106 forks source link

Why do it need the loadTools function? #156

Open liujunao opened 6 months ago

liujunao commented 6 months ago

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
    )
)