lang-chain-apache-age-throwing-error-error-executing-graph-query #2133
Unanswered
rranjanintel
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
from langchain_community.graphs.age_graph import AGEGraph
from langchain.chains import GraphCypherQAChain
text = """Mark Elliot Zuckerberg born May 14, 1984 is an American businessman. He co-founded the social media service Facebook and its parent company Meta Platforms (formerly Facebook, Inc.), of which he is chairman, chief executive officer and controlling shareholder. Zuckerberg has been the subject of multiple lawsuits regarding the creation and ownership of the website as well as issues such as user privacy.
Zuckerberg briefly attended Harvard College, where he launched Facebook in February 2004 with his roommates Eduardo Saverin, Andrew McCollum, Dustin Moskovitz and Chris Hughes. Zuckerberg took the company public in May 2012 with majority shares. In 2008, at age 23, he became the world's youngest self-made billionaire. He has since used his funds to organize multiple donations, including the establishment of the Chan Zuckerberg Initiative. A film depicting Zuckerberg's early career, legal troubles and initial success with Facebook, The Social Network, was released in 2010 and won multiple Academy Awards. His prominence and fast rise in the technology industry has prompted political and legal attention.
Mark Elliot Zuckerberg was born on May 14, 1984, in White Plains, New York to psychiatrist Karen (née Kempner) and dentist Edward Zuckerberg. He and his three sisters (Arielle, Randi, and Donna) were raised in a Reform Jewish household in Dobbs Ferry, New York. His great-grandparents were emigrants from Austria, Germany, and Poland. Zuckerberg initially attended Ardsley High School before transferring to Phillips Exeter Academy. He was captain of the fencing team.
Zuckerberg began using computers and writing software in middle school. In high school, he built a program that allowed all the computers between his house and his father's dental office to communicate with each other.During Zuckerberg's high-school years, he worked to build a music player called the Synapse Media Player. The device used machine learning to learn the user's listening habits, which was posted to Slashdot and received a rating of 3 out of 5 from PC Magazine.The New Yorker once said of Zuckerberg: "some kids played computer games. Mark created them".While still in high school, he attended Mercy College taking a graduate computer course on Thursday evenings. ""
output
[GraphDocument(nodes=[Node(id='Mark Elliot Zuckerberg', type='Person', properties={}), Node(id='May 14, 1984', type='Date', properties={}), Node(id='American', type='Nationality', properties={})], relationships=[Relationship(source=Node(id='Mark Elliot Zuckerberg', type='Person', properties={}), target=Node(id='May 14, 1984', type='Date', properties={}), type='BORN_ON', properties={}), Relationship(source=Node(id='Mark Elliot Zuckerberg', type='Person', properties={}), target=Node(id='American', type='Nationality', properties={}), type='NATIONALITY', properties={})], source=Document(metadata={}, page_content='Mark Elliot Zuckerberg born May 14, 1984 is an American businessman. He co-founded the social media service Facebook\nand its parent company Meta Platforms (formerly Facebook, Inc.), of which he is chairman, chief executive officer and controlling shareholder.\nZuckerberg has been the subject of multiple lawsuits regarding the creation and ownership of the website as well as issues such as user privacy.\n\nZuckerberg briefly attended Harvard College, where he launched Facebook in February 2004 with his roommates Eduardo Saverin, Andrew McCollum,\nDustin Moskovitz and Chris Hughes. Zuckerberg took the company public in May 2012 with majority shares. In 2008, at age 23, he became the world's\nyoungest self-made billionaire. He has since used his funds to organize multiple donations, including the establishment of the Chan Zuckerberg Initiative.\nA film depicting Zuckerberg's early career, legal troubles and initial success with Facebook, The Social Network, was released in 2010 and won\nmultiple Academy Awards. His prominence and fast rise in the technology industry has prompted political and legal attention.\n\nMark Elliot Zuckerberg was born on May 14, 1984, in White Plains, New York to psychiatrist Karen (née Kempner) and dentist Edward Zuckerberg.\nHe and his three sisters (Arielle, Randi, and Donna) were raised in a Reform Jewish household in Dobbs Ferry, New York. His great-grandparents\nwere emigrants from Austria, Germany, and Poland. Zuckerberg initially attended Ardsley High School before transferring to Phillips Exeter Academy.\nHe was captain of the fencing team.\n\nZuckerberg began using computers and writing software in middle school. In high school, he built a program that allowed all the computers between his\nhouse and his father's dental office to communicate with each other.During Zuckerberg's high-school years, he worked to build a music player\ncalled the Synapse Media Player. The device used machine learning to learn the user's listening habits, which was posted to Slashdot and received a\nrating of 3 out of 5 from PC Magazine.The New Yorker once said of Zuckerberg: "some kids played computer games. Mark created them".While still\nin high school, he attended Mercy College taking a graduate computer course on Thursday evenings.\n'))] Nodes:[Node(id='Mark Elliot Zuckerberg', type='Person', properties={}), Node(id='May 14, 1984', type='Date', properties={}), Node(id='American', type='Nationality', properties={})] Relationships:[Relationship(source=Node(id='Mark Elliot Zuckerberg', type='Person', properties={}), target=Node(id='May 14, 1984', type='Date', properties={}), type='BORN_ON', properties={}), Relationship(source=Node(id='Mark Elliot Zuckerberg', type='Person', properties={}), target=Node(id='American', type='Nationality', properties={}), type='NATIONALITY', properties={})]
" result = chain.invoke({"query": "American?"})
print(result)
{ "name": "AGEQueryException", "message": "{'message': 'Error executing graph query: MATCH (a:American)-[:MARK_ELLIOT_ZUCKERBERG]->(b:American) RETURN a, b;', 'detail': 'syntax error at or near ";"\nLINE 3: $$) AS (a agtype, b; agtype);\n ^\n'}",
i was expecting response
Beta Was this translation helpful? Give feedback.
All reactions