Class SQLDatabaseChain
java.lang.Object
com.hw.langchain.chains.base.Chain
com.hw.langchain.chains.sql.database.base.SQLDatabaseChain
Chain for interacting with SQL Database.
- Author:
- HamaWhite
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SQLDatabaseChain
fromLLM
(BaseLanguageModel llm, SQLDatabase database) static SQLDatabaseChain
fromLLM
(BaseLanguageModel llm, SQLDatabase database, BasePromptTemplate prompt) Runs the logic of this chain and returns the output.Return the singular input key.Return the singular output key.
-
Constructor Details
-
SQLDatabaseChain
-
-
Method Details
-
fromLLM
-
fromLLM
public static SQLDatabaseChain fromLLM(BaseLanguageModel llm, SQLDatabase database, BasePromptTemplate prompt) -
chainType
-
inputKeys
Return the singular input key. -
outputKeys
Return the singular output key.- Specified by:
outputKeys
in classChain
- Returns:
- the list of output keys
-
innerCall
Description copied from class:Chain
Runs the logic of this chain and returns the output.
-