https://www.boundaryml.com logo
I'm running into an issue that is
# questions
a
I'm running into an issue that is causing a baml validation error. I've got an enum with an alias that has an accent in it. For the most part, the LLM returns outputs with the accents in the right places. However, sometimes the LLM forgets to use the accent which causes Baml to throw a BamlValidationError. I can see there are a number of ways to handle this, however I wanted to know if there is a preferred way to address this issue with Baml?
Copy code
enum Status{
  anonymous @alias("Anónimo")
  known @alias("Conocido")
}
Can cast the following:
Copy code
{
  "status": "Anónimo",
}
But not the following:
Copy code
{
  "status": "Anonimo",
}
a
ok great find, I think we can fix this
does it need to be in spanish?
or even write it in spanish without the accent?
a
The output doesn't need to be in Spanish (i.e. the alias could be "Anonimo") but if the LLM returns a value with the accent (Anónimo) I would still want it to get cast to the same enum. I hope that is what you meant by your question? I was thinking some kind of string normalization could address this.
a
Yep we will normalize it
a
I just saw this PR: https://github.com/BoundaryML/baml/pull/2210. I wanted to post on here to confirm, but it looks like this change would address the issue I was seeing! If so: wow, thank you the quick turnaround time!
a
yep, it will go out tomorrow (maaybe tonight)
this is now out on 0.203.1