mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 14:31:55 +00:00
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>
This commit is contained in:
14
templates/neo4j-generation/main.py
Normal file
14
templates/neo4j-generation/main.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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,
|
||||
)
|
||||
)
|
Reference in New Issue
Block a user