Powered by
🟡 Is there a way to coerce any float value that a...
# questions
r
rjurney
09/10/2025, 6:01 PM
Is there a way to coerce any float value that appears in an integer field into an integer?
p
prrao
09/11/2025, 12:41 AM
Does the BAML model ask for an integer but the LM returns a float? That's strange
prrao
09/11/2025, 12:42 AM
Maybe adding a failsafe @ description asking for "always return an integer" might help coerce the LM to do better?
prrao
09/11/2025, 12:43 AM
Also, if you're collecting the results on the Python side, a simple Pydantic coercion could work too.
r
rjurney
09/11/2025, 4:49 AM
It looks like it was a bug.
rjurney
09/11/2025, 4:49 AM
@prrao
woe unto he that modifies his generated Pydantic classes...
Previous
Next