Spaces:
Sleeping
Sleeping
Update src/utils/response_processor.py
Browse files
src/utils/response_processor.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from typing import Dict, Any, List, Optional
|
| 2 |
import time
|
| 3 |
from ..knowledge_base.grounding_truth import GroundingTruth
|
| 4 |
-
from .response_templates import get_response_templates
|
| 5 |
|
| 6 |
# Try to import generic responder for multi-perspective optimization
|
| 7 |
GENERIC_RESPONDER_AVAILABLE = False
|
|
@@ -163,7 +163,6 @@ class ResponseProcessor:
|
|
| 163 |
elif confidence >= 0.4:
|
| 164 |
return f"{statement} (possibly)"
|
| 165 |
elif confidence >= 0.2:
|
| 166 |
-
return f"I'm uncertain, but {statement.lower()}"
|
| 167 |
uncertain = self.response_templates.get_uncertain_prefix()
|
| 168 |
return f"{uncertain}{statement.lower()}"
|
| 169 |
else:
|
|
@@ -190,7 +189,6 @@ class ResponseProcessor:
|
|
| 190 |
|
| 191 |
# Add general note if there are uncertain statements (less obtrusive)
|
| 192 |
if uncertain_statements and not verified_statements:
|
| 193 |
-
response_parts.insert(0, "Based on my current understanding:")
|
| 194 |
reflection = self.response_templates.get_reflection_prefix()
|
| 195 |
response_parts.insert(0, reflection)
|
| 196 |
|
|
|
|
| 1 |
from typing import Dict, Any, List, Optional
|
| 2 |
import time
|
| 3 |
from ..knowledge_base.grounding_truth import GroundingTruth
|
| 4 |
+
from ..components.response_templates import get_response_templates
|
| 5 |
|
| 6 |
# Try to import generic responder for multi-perspective optimization
|
| 7 |
GENERIC_RESPONDER_AVAILABLE = False
|
|
|
|
| 163 |
elif confidence >= 0.4:
|
| 164 |
return f"{statement} (possibly)"
|
| 165 |
elif confidence >= 0.2:
|
|
|
|
| 166 |
uncertain = self.response_templates.get_uncertain_prefix()
|
| 167 |
return f"{uncertain}{statement.lower()}"
|
| 168 |
else:
|
|
|
|
| 189 |
|
| 190 |
# Add general note if there are uncertain statements (less obtrusive)
|
| 191 |
if uncertain_statements and not verified_statements:
|
|
|
|
| 192 |
reflection = self.response_templates.get_reflection_prefix()
|
| 193 |
response_parts.insert(0, reflection)
|
| 194 |
|