Turn off cache in Textgrad
It seems that currently if we input the same prompt twice, for the second time Textgrad will automatically use the cached engine and return the cached results. However, in some cases, we want to generate different results each time. Therefore, can we add cache_result to the initialization of Textgrad Engine, so that it will cache results only if we set cache_result=True ?
Definitely, and caching should be made explicit! It took me a while to figure it out...
For anyone looking to fix this, I temporarily nuke the cache. Here's an example on Debian:
rm -rf ~/.cache/textgrad/
We agree with this. A priority led by @vinid will be to unify and improve our engine interface using LiteLLM or a package like this, and we will fix this. This comes from the research origins of the paper, and we will make it more usable!
This should be supported by the new engines! Let us know if they work as expected!