tomhflau commited on
Commit
54c2fa5
·
1 Parent(s): 91536ee

nullable fix

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -79,12 +79,16 @@ class AdvancedReasoningTool(Tool):
79
  "problem_type": {
80
  "type": "string",
81
  "description": "Type of problem (e.g., 'logical', 'mathematical', 'analytical', 'research')",
 
82
  }
83
  }
84
 
85
  output_type = "string"
86
 
87
- def forward(self, problem: str, problem_type: str = "general"):
 
 
 
88
  reasoning_frameworks = {
89
  "logical": "1. Identify premises\n2. Apply logical rules\n3. Check for contradictions\n4. Draw conclusions",
90
  "mathematical": "1. Understand what's being asked\n2. Identify known values\n3. Choose appropriate formulas\n4. Calculate step-by-step\n5. Verify the answer",
 
79
  "problem_type": {
80
  "type": "string",
81
  "description": "Type of problem (e.g., 'logical', 'mathematical', 'analytical', 'research')",
82
+ "nullable": True
83
  }
84
  }
85
 
86
  output_type = "string"
87
 
88
+ def forward(self, problem: str, problem_type: str = None):
89
+ if problem_type is None:
90
+ problem_type = "general"
91
+
92
  reasoning_frameworks = {
93
  "logical": "1. Identify premises\n2. Apply logical rules\n3. Check for contradictions\n4. Draw conclusions",
94
  "mathematical": "1. Understand what's being asked\n2. Identify known values\n3. Choose appropriate formulas\n4. Calculate step-by-step\n5. Verify the answer",