fix followup helpers indentation
This commit is contained in:
parent
4d15bdd466
commit
c0fd606f43
@ -804,26 +804,6 @@ class AnswerEngine:
|
||||
reply = _strip_followup_meta(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(
|
||||
self,
|
||||
question: str,
|
||||
@ -869,6 +849,26 @@ def _strip_followup_meta(reply: str) -> str:
|
||||
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(
|
||||
mode: str,
|
||||
call_count: int,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user