https://promptfoo.dev/ logo
Prompt function vars don't have access to variable...
# ❓|questions
j
I'm using a prompt function and passing in two variables. One file and one value.
Copy code
tests:
    - vars:
          system_message: file://system_message.txt
          user_message: What is your favorite color?
Upon debugging inside the prompt function, I see this when I log the vars variable and run in --verbose:
Copy code
{
  system_message: 'file://system_message.txt',
  user_message: 'What is your favorite color?'
}
Loading var system_message from file: /system_message.txt
It looks like it needs to load the file earlier. Am I doing something wrong?
i
Thanks for flagging, this will be fixed in the next release (probably published within the next hour): https://github.com/promptfoo/promptfoo/pull/583
j
THANKS!!!