Skip to content

Commit 72f56e6

Browse files
committed
Bugfix: removed length limit on submissions
1 parent 76bfe7c commit 72f56e6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

app/math_tutor.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def _load_environment(self, env_path: str):
3333
def get_num_tokens(self):
3434
return self.tokens_processed, self.tokens_emitted
3535

36-
def process_input(self, submission: str, exemplary_solution: str, temperature: float = 0.0, model: str = None) -> Tuple[str, str]:
36+
def process_input(self, submission: str, exemplary_solution: str, temperature: float = 0.0, model: str = None) -> str:
3737
"""
3838
process_input takes a submission (question and associated answer) and an exemplary solution (can be "No exemplary solution provided") and returns feedback and assessed correctness.
3939
:param question: The question to be answered.
@@ -65,9 +65,6 @@ def process_input(self, submission: str, exemplary_solution: str, temperature: f
6565
raise ValueError(f"Submissions that are provided without an exemplary answer must be formatted as a question and answer separated by 'Answer:'.")
6666
except ValueError:
6767
raise ValueError(f"Submissions that are provided without an exemplary answer must be formatted as a question and answer separated by 'Answer:'.")
68-
# Check submission length
69-
if len(submission) > 5000:
70-
return "I apologize, but your submission is too long. Please limit your submission to 5000 characters or less.", "incorrect"
7168

7269
# Call OpenAI moderation endpoint
7370
moderation_response = self.client.moderations.create(input=submission)

0 commit comments

Comments
 (0)