GET
/
sdk
/
v1
/
evaluation-assertions
/
{id}
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.get('1212121');

  console.log(evaluationAssertion);
}

main();
{
  "type": "EXACT_MATCH",
  "evaluationId": "<string>",
  "weight": 1,
  "targetValue": "<string>",
  "jsonPath": "$",
  "ignoreCase": false,
  "negate": false,
  "id": "<string>"
}

Path Parameters

id
string
required
Example:

"1212121"

Response

200
application/json
Successfully retrieved the evaluation assertion
type
enum<string>
required
Available options:
EXACT_MATCH
evaluationId
string
required
targetValue
string
required

The value to match.

id
string
required
weight
number
default:1

How heavily to weigh the assertion within the evaluation.

Required range: 0 <= x <= 1
jsonPath
string | null
default:$

A JSON path to use when matching a JSON response.

ignoreCase
boolean
default:false

Whether to ignore case when comparing strings.

negate
boolean
default:false

Whether to negate the assertion. "true" means the assertion must NOT be true.