Kackle commited on
Commit
2a78eee
·
verified ·
1 Parent(s): 2cfd67c
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -31,6 +31,7 @@ class TrickQuestionDetector(Tool):
31
  super().__init__()
32
  self.name = "trick_detector"
33
  self.description = "Analyze if a question is a trick question and provide guidance"
 
34
 
35
  def detect_trick(self, question: str) -> str:
36
  """Detect common trick question patterns"""
@@ -65,6 +66,7 @@ class StepByStepReasoner(Tool):
65
  super().__init__()
66
  self.name = "step_reasoner"
67
  self.description = "Break down complex questions into logical steps"
 
68
 
69
  def reason_steps(self, question: str) -> str:
70
  """Break question into reasoning steps"""
@@ -98,6 +100,7 @@ class FactChecker(Tool):
98
  super().__init__()
99
  self.name = "fact_checker"
100
  self.description = "Check factual accuracy and provide confidence assessment"
 
101
 
102
  def check_facts(self, claim: str) -> str:
103
  """Assess factual accuracy of a claim"""
@@ -128,6 +131,7 @@ class AnswerValidator(Tool):
128
  super().__init__()
129
  self.name = "answer_validator"
130
  self.description = "Validate if an answer is reasonable for the given question"
 
131
 
132
  def validate_answer(self, question: str, answer: str) -> str:
133
  """Check if answer is reasonable for the question"""
 
31
  super().__init__()
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"""
 
66
  super().__init__()
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"""
 
100
  super().__init__()
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"""
 
131
  super().__init__()
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"""