Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,6 +32,7 @@ class TrickQuestionDetector(Tool):
|
|
| 32 |
self.name = "trick_detector"
|
| 33 |
self.description = "Analyze if a question is a trick question and provide guidance"
|
| 34 |
self.inputs = {"question": {"type": "string", "description": "The question to analyze"}}
|
|
|
|
| 35 |
|
| 36 |
def detect_trick(self, question: str) -> str:
|
| 37 |
"""Detect common trick question patterns"""
|
|
@@ -67,6 +68,7 @@ class StepByStepReasoner(Tool):
|
|
| 67 |
self.name = "step_reasoner"
|
| 68 |
self.description = "Break down complex questions into logical steps"
|
| 69 |
self.inputs = {"question": {"type": "string", "description": "The question to break down"}}
|
|
|
|
| 70 |
|
| 71 |
def reason_steps(self, question: str) -> str:
|
| 72 |
"""Break question into reasoning steps"""
|
|
@@ -101,6 +103,7 @@ class FactChecker(Tool):
|
|
| 101 |
self.name = "fact_checker"
|
| 102 |
self.description = "Check factual accuracy and provide confidence assessment"
|
| 103 |
self.inputs = {"claim": {"type": "string", "description": "The claim to fact-check"}}
|
|
|
|
| 104 |
|
| 105 |
def check_facts(self, claim: str) -> str:
|
| 106 |
"""Assess factual accuracy of a claim"""
|
|
@@ -132,6 +135,7 @@ class AnswerValidator(Tool):
|
|
| 132 |
self.name = "answer_validator"
|
| 133 |
self.description = "Validate if an answer is reasonable for the given question"
|
| 134 |
self.inputs = {"question": {"type": "string", "description": "The question"}, "answer": {"type": "string", "description": "The answer to validate"}}
|
|
|
|
| 135 |
|
| 136 |
def validate_answer(self, question: str, answer: str) -> str:
|
| 137 |
"""Check if answer is reasonable for the question"""
|
|
|
|
| 32 |
self.name = "trick_detector"
|
| 33 |
self.description = "Analyze if a question is a trick question and provide guidance"
|
| 34 |
self.inputs = {"question": {"type": "string", "description": "The question to analyze"}}
|
| 35 |
+
self.output_type = "string"
|
| 36 |
|
| 37 |
def detect_trick(self, question: str) -> str:
|
| 38 |
"""Detect common trick question patterns"""
|
|
|
|
| 68 |
self.name = "step_reasoner"
|
| 69 |
self.description = "Break down complex questions into logical steps"
|
| 70 |
self.inputs = {"question": {"type": "string", "description": "The question to break down"}}
|
| 71 |
+
self.output_type = "string"
|
| 72 |
|
| 73 |
def reason_steps(self, question: str) -> str:
|
| 74 |
"""Break question into reasoning steps"""
|
|
|
|
| 103 |
self.name = "fact_checker"
|
| 104 |
self.description = "Check factual accuracy and provide confidence assessment"
|
| 105 |
self.inputs = {"claim": {"type": "string", "description": "The claim to fact-check"}}
|
| 106 |
+
self.output_type = "string"
|
| 107 |
|
| 108 |
def check_facts(self, claim: str) -> str:
|
| 109 |
"""Assess factual accuracy of a claim"""
|
|
|
|
| 135 |
self.name = "answer_validator"
|
| 136 |
self.description = "Validate if an answer is reasonable for the given question"
|
| 137 |
self.inputs = {"question": {"type": "string", "description": "The question"}, "answer": {"type": "string", "description": "The answer to validate"}}
|
| 138 |
+
self.output_type = "string"
|
| 139 |
|
| 140 |
def validate_answer(self, question: str, answer: str) -> str:
|
| 141 |
"""Check if answer is reasonable for the question"""
|