langchain/templates/neo4j-generation/main.py
Erick Friis ebf998acb6
Templates (#12294)
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
Co-authored-by: Lance Martin <lance@langchain.dev>
Co-authored-by: Jacob Lee <jacoblee93@gmail.com>
2023-10-25 18:47:42 -07:00

15 lines
418 B
Python

from neo4j_generation.chain import chain
if __name__ == "__main__":
text = "Harrison works at LangChain, which is located in San Francisco"
allowed_nodes = ["Person", "Organization", "Location"]
allowed_relationships = ["WORKS_AT", "LOCATED_IN"]
print(
chain(
text,
allowed_nodes=allowed_nodes,
allowed_relationships=allowed_relationships,
)
)