Skip to content
Snippets Groups Projects
Commit b8e02018 authored by spmohanty's avatar spmohanty
Browse files

use only the first MAX_RESPONSE_CHARACTERS of response

parent 4e2c3116
No related branches found
No related tags found
No related merge requests found
import ast
MAX_RESPONSE_CHARACTERS = 5000
class ShoppingBenchTaskParsers:
"""
......@@ -49,6 +51,9 @@ class ShoppingBenchTaskParsers:
response, str
), f"Response must be a string, but got {type(response)}"
# Consider only the first MAX_RESPONSE_CHARACTERS
response = response[:MAX_RESPONSE_CHARACTERS]
# Attempt to retrieve the appropriate parser method for the task type.
parser_method = task_parser_methods.get(self.task_type)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment