When I first looked into this project, I thought you could get a guarantee (not just reasonable high chance) that you will get a response in the required schema.
From my experience, this isn't the case, unless I used the library incorrectly.
I think this could be implemented by using a fallback in the stream, i.e. when you receive a token that is incompatible with the schema, you instead go on with the 2nd most likely option, etc.
How feasible is this idea? For GPT-4, you have access to the logprobs, which would enable this approach, right?
When I first looked into this project, I thought you could get a guarantee (not just reasonable high chance) that you will get a response in the required schema.
From my experience, this isn't the case, unless I used the library incorrectly.
I think this could be implemented by using a fallback in the stream, i.e. when you receive a token that is incompatible with the schema, you instead go on with the 2nd most likely option, etc.
How feasible is this idea? For GPT-4, you have access to the logprobs, which would enable this approach, right?