cyh0530
08/05/2025, 10:18 PMpromptfoo eval -c config.yaml --output result.xml, I got the following error message. Is this a known issue?
/opt/homebrew/Cellar/promptfoo/0.117.4/libexec/lib/node_modules/promptfoo/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js:268
textValue = textValue.replace(entity.regex, entity.val);
^
TypeError: textValue.replace is not a function
at Builder.replaceEntitiesValue (/opt/homebrew/Cellar/promptfoo/0.117.4/libexec/lib/node_modules/promptfoo/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js:268:29)
at Builder.buildTextValNode (/opt/homebrew/Cellar/promptfoo/0.117.4/libexec/lib/node_modules/promptfoo/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js:252:22)
at Builder.j2x (/opt/homebrew/Cellar/promptfoo/0.117.4/libexec/lib/node_modules/promptfoo/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js:116:23)
at Builder.processTextOrObjNode (/opt/homebrew/Cellar/promptfoo/0.117.4/libexec/lib/node_modules/promptfoo/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js:181:23)
at Builder.j2x (/opt/homebrew/Cellar/promptfoo/0.117.4/libexec/lib/node_modules/promptfoo/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js:140:32)
at Builder.processTextOrObjNode (/opt/homebrew/Cellar/promptfoo/0.117.4/libexec/lib/node_modules/promptfoo/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js:181:23)
at Builder.j2x (/opt/homebrew/Cellar/promptfoo/0.117.4/libexec/lib/node_modules/promptfoo/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js:165:21)
at Builder.processTextOrObjNode (/opt/homebrew/Cellar/promptfoo/0.117.4/libexec/lib/node_modules/promptfoo/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js:181:23)
at Builder.j2x
... truncating the rest because message is too long
Node.js v24.4.1Tabs [Promptfoo]
08/06/2025, 12:30 AMWill [Promptfoo]
08/12/2025, 1:57 PMconfig.yaml? Thankscyh0530
08/13/2025, 12:23 AMdescription: "Response evaluation"
prompts:
- file://sample.py:get_prompt
providers:
- "openrouter:openai/gpt-4.1"
tests:
- description: Response evaluation
assert:
- type: model-graded-closedqa
value: The assistant answers the question.
sample.py
def get_prompt(_):
return [
{
"role": "user",
"content": "What's the capital of France?",
},
]Will [Promptfoo]
08/13/2025, 1:58 PMpromptfoo (1.117.5) and then try re-running the command with the --no-cache and --verbose flags appended to it?cyh0530
08/18/2025, 6:04 PM