Open riedgar-ms opened 3 months ago
If you use gen(regex=[^<>]+) or similar for gen text it should work
That did it ... although that's not an entirely obvious fix.
Sorry for the deleted comments, I managed to mess up my initial application of your fix
Yeah, I agree. I think we should have a warning about zero_or_more(char_range(...))
and similar. In some cases, we may be able to automatically wrap them in as_regular_grammar()
(it's equivalent to gen()
), however it is a bit tricky not to mess with semantics...
I've created a very simple HTML cookbook for Guidance: https://github.com/Harsha-Nori/guidance-cookbook/tree/main/simple-html However, when trying to run this against and Azure AI deployed model, I got a rather strange error message: This is.... not particularly helpful to someone who isn't an expert in grammars and the like.
I was eventually able to bully things into working by simplifying the HTML which could be generated even more, but the limit I appear to be encountering seems very low given how simple the basic structure being described is.