Skip to content

Commit dc1340e

Browse files
committed
Update generate_answer_pdf_node.py
1 parent e45f159 commit dc1340e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scrapegraphai/nodes/generate_answer_pdf_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def execute(self, state):
113113
template=template_no_chunks_pdf,
114114
input_variables=["question"],
115115
partial_variables={
116-
"context":chunk,
116+
"context":chunk.page_content,
117117
"format_instructions": format_instructions,
118118
},
119119
)
@@ -150,5 +150,5 @@ def execute(self, state):
150150
answer = merge_chain.invoke({"context": answer, "question": user_prompt})
151151

152152
# Update the state with the generated answer
153-
state.update({self.output[0]: answer})
153+
state.update({self.output[0]: answer.get("Response", {})})
154154
return state

0 commit comments

Comments
 (0)