Open foogunlana opened 1 year ago
A more general version of this could also let you swap out OpenAI entirely, so that the original PromptCase
you have becomes a special case of the DynamicPromptCase
with pre-defined values like OpenAI, and no enhancements, etc.
Hi @mistercrunch
Thanks for building this, it's sorely needed.
I noticed it's targeted at static prompts (You can write the prompt directly into the code).
This means it's useful for unit tests, but not e2e tests of prompts that load some of their text from a similarity search on a vector DB or other.
I think this could be easy to fix by adding another test case that relies on an external function or API call to call the LLM. Right now after skimming the code, my guess is that the PromptCase speaks directly to OpenAI and so there's no room for external calls to modify the prompt.
I think this would be a super useful feature as a lot of applications are being built with this architecture and have the same problem you're trying to solve as you build it for Preset. I'm happy to work on it as well if you think it's something you'd add to the repo.