import PromptFoundry from '@prompt-foundry/typescript-sdk';
const client = new PromptFoundry({
apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted
});
async function main() {
const evaluationAssertion = await client.evaluationAssertions.create({
evaluationId: 'evaluationId',
targetValue: 'targetValue',
type: 'EXACT_MATCH',
});
console.log(evaluationAssertion);
}
main();
{
"type": "EXACT_MATCH",
"evaluationId": "<string>",
"weight": 1,
"targetValue": "<string>",
"jsonPath": "$",
"ignoreCase": false,
"negate": false,
"id": "<string>"
}
Creates a new evaluation assertion
import PromptFoundry from '@prompt-foundry/typescript-sdk';
const client = new PromptFoundry({
apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted
});
async function main() {
const evaluationAssertion = await client.evaluationAssertions.create({
evaluationId: 'evaluationId',
targetValue: 'targetValue',
type: 'EXACT_MATCH',
});
console.log(evaluationAssertion);
}
main();
{
"type": "EXACT_MATCH",
"evaluationId": "<string>",
"weight": 1,
"targetValue": "<string>",
"jsonPath": "$",
"ignoreCase": false,
"negate": false,
"id": "<string>"
}
Successful operation
The response is of type object
.
Was this page helpful?