dspy
dspy copied to clipboard
fix(dspy): Fix template.extract to be more robust
While experimenting with GPT4/Gemini, noticed that sometimes the completion will contain the input.
In that case, the previous template.extract
will fail to extract (see test_single_output_with_noise
test). This provides a fix for such a situation.