Every so often I'll get responses from LLMs that look like this:

I'll analyze and evaluate that for you. Here are the results
{
   "result" : "PASS"
}

Which results in BeanOutputConverter failing to parse the response. o.s.ai.converter.BeanOutputConverter : Could not parse the given text to the desired target type:

Would it make sense to enhance BeanOutputConverters trimming logic to trim everything before the JSON payload?

Expected Behavior

When mapping a response from a ChatClient, if the response from the LLM contains a preamble before a valid JSON response, BeanOutputConverter should trim it and successfully parse the response.

Current Behavior

BeanOutputConverter fails to parse the response and throws and error.