fix followup helpers indentation

This commit is contained in:
Brad Stein 2026-02-02 10:04:25 -03:00
parent 4d15bdd466
commit c0fd606f43

View File

@ -804,26 +804,6 @@ class AnswerEngine:
reply = _strip_followup_meta(reply) reply = _strip_followup_meta(reply)
return reply return reply
def _strip_followup_meta(reply: str) -> str:
cleaned = reply.strip()
if not cleaned:
return cleaned
prefixes = [
"The draft is correct based on the provided context.",
"The draft is correct based on the context.",
"The draft is correct based on the provided evidence.",
"The draft is correct.",
"Based on the provided context,",
"Based on the context,",
"Based on the provided evidence,",
]
for prefix in prefixes:
if cleaned.lower().startswith(prefix.lower()):
cleaned = cleaned[len(prefix) :].lstrip(" .")
break
return cleaned
async def _select_claims( async def _select_claims(
self, self,
question: str, question: str,
@ -869,6 +849,26 @@ def _strip_followup_meta(reply: str) -> str:
self._store.cleanup() self._store.cleanup()
def _strip_followup_meta(reply: str) -> str:
cleaned = reply.strip()
if not cleaned:
return cleaned
prefixes = [
"The draft is correct based on the provided context.",
"The draft is correct based on the context.",
"The draft is correct based on the provided evidence.",
"The draft is correct.",
"Based on the provided context,",
"Based on the context,",
"Based on the provided evidence,",
]
for prefix in prefixes:
if cleaned.lower().startswith(prefix.lower()):
cleaned = cleaned[len(prefix) :].lstrip(" .")
break
return cleaned
def _build_meta( def _build_meta(
mode: str, mode: str,
call_count: int, call_count: int,