Sometimes with the model responses, even though we explicitly tell it not to output markdown syntax, it still does it. This PR uses a regex to remove the wrapper.
It also implements pytest since this is just a pure function and thus can be tested more easily.
Sometimes with the model responses, even though we explicitly tell it not to output markdown syntax, it still does it. This PR uses a regex to remove the wrapper.
It also implements pytest since this is just a pure function and thus can be tested more easily.