Open idvorkin opened 1 month ago
My guess is we expect beta to be the method we call specifically for structured outputs just like open ai.
If groq supports structured output by some other means then we need to update the groq provider’s “provider call function” method to return the appropriate function call for structured outputs.
If groq does not support structured outputs (or does, but only certain models) this same method could be updated to detect the call involves a structured output (ie result_format is not null), optionally check for a supported model, and throw a more informative error (groq does not support structured outputs/ only for these models but got
Trade offs here are maintenance as groq adds new features. If there’s an easy way to defer the source of truth about structured output support to the groq package itself we’d definitely prefer that.
While the groq client works if you use a simple format, when you pass a complex format, it fails. If this isn't supported, could we include a better error message?
E.g.
Results in:
Similar to #253