kevinhug commited on
Commit
afa334c
·
1 Parent(s): 8361559
Files changed (1) hide show
  1. graphrag.py +3 -3
graphrag.py CHANGED
@@ -93,8 +93,7 @@ def reasoning(text, question):
93
  def marketing(text, question):
94
  try:
95
  print("Generate Knowledgegraph...")
96
- graph, graph_documents_filtered = knowledge_graph(f"""Create
97
- marketing campaign that can improve customer acquisition, activation, retention and referral for this persona: {text}""")
98
 
99
  print("GraphQAChain...")
100
  graph_rag = GraphQAChain.from_llm(
@@ -104,7 +103,8 @@ def marketing(text, question):
104
  )
105
 
106
  print("Answering through GraphQAChain...")
107
- answer = graph_rag.invoke(question)
 
108
  return answer['result']
109
 
110
  except Exception as e:
 
93
  def marketing(text, question):
94
  try:
95
  print("Generate Knowledgegraph...")
96
+ graph, graph_documents_filtered = knowledge_graph(text)
 
97
 
98
  print("GraphQAChain...")
99
  graph_rag = GraphQAChain.from_llm(
 
103
  )
104
 
105
  print("Answering through GraphQAChain...")
106
+ answer = graph_rag.invoke(f"""Create
107
+ marketing campaign that can improve customer acquisition, activation, retention and referral for this persona: {question}""")
108
  return answer['result']
109
 
110
  except Exception as e: