mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
add debug
This commit is contained in:
+3
-1
@@ -40,7 +40,9 @@ class ConversationalRetrievalQAChain_Chains implements INode {
|
||||
const model = nodeData.inputs?.model as BaseLanguageModel
|
||||
const vectorStoreRetriever = nodeData.inputs?.vectorStoreRetriever as BaseRetriever
|
||||
|
||||
const chain = ConversationalRetrievalQAChain.fromLLM(model, vectorStoreRetriever)
|
||||
const chain = ConversationalRetrievalQAChain.fromLLM(model, vectorStoreRetriever, {
|
||||
verbose: process.env.DEBUG === 'true' ? true : false
|
||||
})
|
||||
return chain
|
||||
}
|
||||
|
||||
|
||||
@@ -62,10 +62,10 @@ class LLMChain_Chains implements INode {
|
||||
const promptValues = prompt.promptValues as ICommonObject
|
||||
|
||||
if (output === this.name) {
|
||||
const chain = new LLMChain({ llm: model, prompt })
|
||||
const chain = new LLMChain({ llm: model, prompt, verbose: process.env.DEBUG === 'true' ? true : false })
|
||||
return chain
|
||||
} else if (output === 'outputPrediction') {
|
||||
const chain = new LLMChain({ llm: model, prompt })
|
||||
const chain = new LLMChain({ llm: model, prompt, verbose: process.env.DEBUG === 'true' ? true : false })
|
||||
const inputVariables = chain.prompt.inputVariables as string[] // ["product"]
|
||||
const res = await runPrediction(inputVariables, chain, input, promptValues)
|
||||
// eslint-disable-next-line no-console
|
||||
|
||||
@@ -40,7 +40,7 @@ class RetrievalQAChain_Chains implements INode {
|
||||
const model = nodeData.inputs?.model as BaseLanguageModel
|
||||
const vectorStoreRetriever = nodeData.inputs?.vectorStoreRetriever as BaseRetriever
|
||||
|
||||
const chain = RetrievalQAChain.fromLLM(model, vectorStoreRetriever)
|
||||
const chain = RetrievalQAChain.fromLLM(model, vectorStoreRetriever, { verbose: process.env.DEBUG === 'true' ? true : false })
|
||||
return chain
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,8 @@ const getSQLDBChain = async (databaseType: 'sqlite', dbFilePath: string, llm: Ba
|
||||
|
||||
const obj: SqlDatabaseChainInput = {
|
||||
llm,
|
||||
database: db
|
||||
database: db,
|
||||
verbose: process.env.DEBUG === 'true' ? true : false
|
||||
}
|
||||
|
||||
const chain = new SqlDatabaseChain(obj)
|
||||
|
||||
@@ -40,7 +40,7 @@ class VectorDBQAChain_Chains implements INode {
|
||||
const model = nodeData.inputs?.model as BaseLanguageModel
|
||||
const vectorStore = nodeData.inputs?.vectorStore as VectorStore
|
||||
|
||||
const chain = VectorDBQAChain.fromLLM(model, vectorStore)
|
||||
const chain = VectorDBQAChain.fromLLM(model, vectorStore, { verbose: process.env.DEBUG === 'true' ? true : false })
|
||||
return chain
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user