The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[minor]: GraphCypherQAChain to accept additional inputs as provided by the user for cypher generation (#24300)
Rafael Pereira6a45bf9554f4
diff --git a/libs/community/langchain_community/chains/graph_qa/cypher.py b/libs/community/langchain_community/chains/graph_qa/cypher.pyindex e4168cccef..2d6263cf8b 100644--- a/libs/community/langchain_community/chains/graph_qa/cypher.py+++ b/libs/community/langchain_community/chains/graph_qa/cypher.py@@ -311,12 +311,15 @@ class GraphCypherQAChain(Chain):_run_manager = run_manager or CallbackManagerForChainRun.get_noop_manager()callbacks = _run_manager.get_child()question = inputs[self.input_key]+ args = {+ "question": question,+ "schema": self.graph_schema,+ }+ args.update(inputs)intermediate_steps: List = []- generated_cypher = self.cypher_generation_chain.run(- {"question": question, "schema": self.graph_schema}, callbacks=callbacks- )+ generated_cypher = self.cypher_generation_chain.run(args, callbacks=callbacks)# Extract Cypher code if it is wrapped in backticksgenerated_cypher = extract_cypher(generated_cypher)