explicit todo that this is only short term

This commit is contained in:
erikkaum 2024-07-26 15:50:35 +02:00
parent 270ec41b09
commit b97684536f

View File

@ -523,6 +523,7 @@ class GrammarLogitProcessor(LogitsProcessor):
if grammar_type == GrammarType.GRAMMAR_TYPE_JSON: if grammar_type == GrammarType.GRAMMAR_TYPE_JSON:
try: try:
schema = build_regex_from_schema(schema) schema = build_regex_from_schema(schema)
# TODO: this is only here short term to avoid crashing the python server, mid term we want this in the rust/router layer
except Exception as e: except Exception as e:
logger.error(f"Error compiling FSM, grammar won't be enforced \n{e}") logger.error(f"Error compiling FSM, grammar won't be enforced \n{e}")
# allows everything # allows everything