https://promptfoo.dev/ logo
Using file as regex source
# ❓|questions
h
Hello, I have a pretty complex regex that I do not want to write on a single line (because of the quotes and special chars skip burden). What i did is use the file:// method to load the regex into my test files. But i struggle to make it work. Here is my files structure and how i point to the file But when i run the eval, it does not recognize the path. Is it because the paths must be relative to where the promptfooconfig.yaml is and not the tests.yaml ? EDIT: Managed to make it work by specifying the absolute full path to the regex file, but that's not ideal since people that clone my project must modify it by its own path... https://cdn.discordapp.com/attachments/1228267218836394015/1228267219042041949/image.png?ex=662b6bfd&is=6618f6fd&hm=4b9beeba5156809b25c3f5d92c349551d0d87114549cf5b9b9833e7e380ab0b1& https://cdn.discordapp.com/attachments/1228267218836394015/1228267219298029598/image.png?ex=662b6bfd&is=6618f6fd&hm=148d14524d8db5341421bdc3dab9bf4c2cf4871335be6d387103a2cf246175b6& https://cdn.discordapp.com/attachments/1228267218836394015/1228267219570397214/image.png?ex=662b6bfd&is=6618f6fd&hm=a3130ca7de58e32ac43ea65e90bcec479e31c77ff499756df923cabf04f8d2a4&
i
Thanks for flagging, this should fix it to support relative paths https://github.com/promptfoo/promptfoo/pull/664