-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Context:
function buildPrompt(userType, strictMode) {
return new PromptBuilder()
.role(baseInstruction)
.constraints(outputRule)
.constraints({
condition: createCondition(
() => userType === "enterprise",
enterpriseRules
),
})
.constraints({
condition: createCondition(
() => strictMode === true,
strictJsonRules
),
})
.build();
}It throws error
TypeError: template.replace is not a function
at PromptBuilder.substituteParameters (/Users/hoangnguyen/Documents/Working/Codeaholicguy/Code/ai-playground/test-promptfmt/node_modules/promptfmt/dist/builders/prompt-builder.js:184:25)
The log of substituteParameters
Substituting parameters in template:
You are an assistant that generates API test cases.
Return the result in JSON format.
Substituting parameters in template:
Output only valid JSON.
Substituting parameters in template: {
condition: {
if: [Function (anonymous)],
then: '\nInclude edge cases and failure scenarios.\n',
else: undefined
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels