mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-16 15:04:13 +00:00
Add memory to sql chain (#8597)
continuation of PR #8550 @hwchase17 please see and merge. And also close the PR #8550. --------- Co-authored-by: Harrison Chase <hw.chase.17@gmail.com> Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
committed by
GitHub
parent
feabf2e0d5
commit
3bddd708f7
@@ -122,6 +122,9 @@ class SQLDatabaseChain(Chain):
|
||||
"table_info": table_info,
|
||||
"stop": ["\nSQLResult:"],
|
||||
}
|
||||
if self.memory is not None:
|
||||
for k in self.memory.memory_variables:
|
||||
llm_inputs[k] = inputs[k]
|
||||
intermediate_steps: List = []
|
||||
try:
|
||||
intermediate_steps.append(llm_inputs) # input: sql generation
|
||||
|
Reference in New Issue
Block a user