Path Parameters
Example:
"1212121"
Body
application/json
Response
Successful operation
The response is of type object
.
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.update('1212121', {
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>"
}
Update an existing evaluation assertion by providing its ID and new data.
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.update('1212121', {
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>"
}
"1212121"
Successful operation
The response is of type object
.
Was this page helpful?