https://www.boundaryml.com logo
🟡 Is there a way to coerce any float value that a...
# questions
r
Is there a way to coerce any float value that appears in an integer field into an integer?
p
Does the BAML model ask for an integer but the LM returns a float? That's strange
Maybe adding a failsafe @ description asking for "always return an integer" might help coerce the LM to do better?
Also, if you're collecting the results on the Python side, a simple Pydantic coercion could work too.
r
It looks like it was a bug.
@prrao woe unto he that modifies his generated Pydantic classes...