Skip to content

Commit

Permalink
fix: minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
taprosoft committed Nov 5, 2024
1 parent 9994edc commit 9741003
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions libs/ktem/ktem/reasoning/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ def prepare_mindmap(self, answer) -> Document | None:
def prepare_citation_viz(self, answer, question, docs) -> Document | None:
doc_texts = [doc.text for doc in docs]
citation_plot = None
plot_content = None

if answer.metadata["citation_viz"] and len(docs) > 1:
try:
Expand All @@ -668,15 +669,6 @@ def prepare_citation_viz(self, answer, question, docs) -> Document | None:
if citation_plot:
plot = to_json(citation_plot)
plot_content = Document(channel="plot", content=plot)
else:
plot_content = None
else:
print(
"The visualization feat was not enabled or "
"the number of documents cited did not meet "
"the presentation requirements."
)
plot_content = None

return plot_content

Expand Down

0 comments on commit 9741003

Please sign in to comment.