file-wise `prompts` for `evaluate()` (on javascript) is unusable
YiFanChen99 opened this issue · comments
It seem that the evaluate()
did not read the corrsponding given file properly?
For examples, I ran your examples/node-package/full-eval.js
.
The results output will be:
{
...,
"provider": {
"id": "openai:gpt-3.5-turbo"
},
"prompt": {
"raw": "file://prompt.txt",
"display": "file://prompt.txt"
},
"vars": {
"body": "Hello world"
},
"response": {
"output": "I'm sorry, but I cannot access files on your device. How can I assist you today?",
"tokenUsage": {
"total": 31,
"prompt": 11,
"completion": 20
},
"cached": false,
"cost": 0.0000355
},
...
}
I have tried with promptfoo ver. 0.51.0 and 0.52.0.
FYR: Seems that the evaluate()
are still unsupporting the filepaths? index.ts#L40
Thank you for flagging this. Yes, perhaps we should add handling for file://
prefix. As a workaround for now, you can load the file content in your code.