auto validate tool arguments, improve validation messages (#200)
Marking this as closing https://github.com/dart-lang/ai/issues/197 - it should significantly help the LLM figure out what it did wrong. The error would now be something like "Value `<root>` is not of type `List<dynamic>` at path #root["roots"]".
I made a fair number of changes to the validation errors here, namely only emitting errors for the leaf node where the error actually happened and not the entire path up. I don't think that extra info was helpful.
cc @kenzieschmoll
15 files changed