-
Checked other resources
Commit to Help
Example CodecypherChain = GraphCypherQAChain(allow_dangerous_requests=True).from_llm(
ChatOpenAI(temperature=0),
graph=kg,
verbose=True,
cypher_prompt=CYPHER_GENERATION_PROMPT,
) DescriptionI'm trying to use GraphCypherChain but is gives me this error. I need exact syntax to use allow_dangerous_requests parameter. System InfoSystem Information
Package Information
Optional packages not installed
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@awais019 I think you are misunderstanding the class. You should use GraphCypherQAChain() when you need to explicitly create an instance of the class. However, if you just need to quickly set up the chain using an LLM, you can use the from_llm method, like this: cypherChain = GraphCypherQAChain.from_llm(
ChatOpenAI(temperature=0),
verbose=True,
allow_dangerous_requests=True,
graph=kg
) |
Beta Was this translation helpful? Give feedback.
-
It worked thank you very much |
Beta Was this translation helpful? Give feedback.
@awais019 I think you are misunderstanding the class. You should use GraphCypherQAChain() when you need to explicitly create an instance of the class. However, if you just need to quickly set up the chain using an LLM, you can use the from_llm method, like this: