Class LLMMathChain
java.lang.Object
com.hw.langchain.chains.base.Chain
com.hw.langchain.chains.llm.math.base.LLMMathChain
Chain that interprets a prompt and executes python code to do math.
- Author:
- HamaWhite
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluateExpression(String expression) static LLMMathChainfromLLM(BaseLanguageModel llm) static LLMMathChainfromLLM(BaseLanguageModel llm, BasePromptTemplate prompt) Runs the logic of this chain and returns the output.Expect input key.Expect output key.processLLMResult(String llmOutput)
-
Constructor Details
-
LLMMathChain
public LLMMathChain() -
LLMMathChain
-
-
Method Details
-
fromLLM
-
fromLLM
-
chainType
-
inputKeys
Expect input key. -
outputKeys
Expect output key.- Specified by:
outputKeysin classChain- Returns:
- the list of output keys
-
evaluateExpression
-
processLLMResult
-
innerCall
Description copied from class:ChainRuns the logic of this chain and returns the output.
-