From f3a2a293f2aa36a2bc690b5957646e8028ce87a1 Mon Sep 17 00:00:00 2001 From: Tadashi Date: Mon, 25 Nov 2024 16:07:56 +0700 Subject: [PATCH] fix: remove debug print #none --- libs/kotaemon/kotaemon/indices/qa/citation_qa.py | 1 - libs/kotaemon/kotaemon/indices/qa/citation_qa_inline.py | 2 -- libs/ktem/ktem/utils/render.py | 2 -- 3 files changed, 5 deletions(-) diff --git a/libs/kotaemon/kotaemon/indices/qa/citation_qa.py b/libs/kotaemon/kotaemon/indices/qa/citation_qa.py index 0fda8c7..a727246 100644 --- a/libs/kotaemon/kotaemon/indices/qa/citation_qa.py +++ b/libs/kotaemon/kotaemon/indices/qa/citation_qa.py @@ -348,7 +348,6 @@ class AnswerWithContextPipeline(BaseComponent): to_highlight, elem_id=str(span_idx + 1) if span_idx is not None else None, ) - print(text) if idx < len(ss) - 1: text += cur_doc.text[span["end"] : ss[idx + 1]["start"]] text += cur_doc.text[ss[-1]["end"] :] diff --git a/libs/kotaemon/kotaemon/indices/qa/citation_qa_inline.py b/libs/kotaemon/kotaemon/indices/qa/citation_qa_inline.py index 414e4e2..5b0bf99 100644 --- a/libs/kotaemon/kotaemon/indices/qa/citation_qa_inline.py +++ b/libs/kotaemon/kotaemon/indices/qa/citation_qa_inline.py @@ -106,7 +106,6 @@ class AnswerWithInlineCitation(AnswerWithContextPipeline): matched_citations.add(citation) for citation in matched_citations: - print("Found citation:", citation) answer = answer.replace( citation, ( @@ -115,7 +114,6 @@ class AnswerWithInlineCitation(AnswerWithContextPipeline): ), ) - print("Replaced answer:", answer) return answer def stream( # type: ignore diff --git a/libs/ktem/ktem/utils/render.py b/libs/ktem/ktem/utils/render.py index 3614ad2..9bab731 100644 --- a/libs/ktem/ktem/utils/render.py +++ b/libs/ktem/ktem/utils/render.py @@ -90,8 +90,6 @@ class Render: highlight_text = ( text.replace("\n", "").replace('"', "").replace("'", "") ) - - # print("highlight_text", highlight_text, phrase, lang) except Exception as e: print(e) highlight_text = text