graphrag
Browse files- graphrag.py +2 -2
graphrag.py
CHANGED
|
@@ -44,9 +44,9 @@ Revenue: How do you make money?
|
|
| 44 |
question=f"Create marketing campaign that can improve customer acquisition, activation, retention and referral for this persona: {customer}"
|
| 45 |
def knowledge_graph(text):
|
| 46 |
documents = [Document(page_content=text)]
|
| 47 |
-
llm_transformer_filtered = LLMGraphTransformer(llm=llm
|
| 48 |
# allowed_nodes=["Need", "Issue", "Product"],
|
| 49 |
-
# allowed_relationships=["WANT", "WITH", "USING", "RECOMMEND"]
|
| 50 |
graph_documents_filtered = llm_transformer_filtered.convert_to_graph_documents(documents)
|
| 51 |
graph = NetworkxEntityGraph()
|
| 52 |
|
|
|
|
| 44 |
question=f"Create marketing campaign that can improve customer acquisition, activation, retention and referral for this persona: {customer}"
|
| 45 |
def knowledge_graph(text):
|
| 46 |
documents = [Document(page_content=text)]
|
| 47 |
+
llm_transformer_filtered = LLMGraphTransformer(llm=llm)
|
| 48 |
# allowed_nodes=["Need", "Issue", "Product"],
|
| 49 |
+
# allowed_relationships=["WANT", "WITH", "USING", "RECOMMEND"]
|
| 50 |
graph_documents_filtered = llm_transformer_filtered.convert_to_graph_documents(documents)
|
| 51 |
graph = NetworkxEntityGraph()
|
| 52 |
|