GET
/
sdk
/
v1
/
evaluations
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 evaluations = await client.evaluations.list();

  console.log(evaluations);
}

main();
[
  {
    "id": "<string>",
    "promptId": "<string>",
    "appendedMessages": [
      {
        "content": [
          {
            "type": "TEXT",
            "text": "<string>"
          }
        ],
        "role": "assistant"
      }
    ],
    "variables": {},
    "weight": 1,
    "threshold": 1
  }
]

Response

200
application/json
Successful operation
id
string
required
promptId
string
required
appendedMessages
object[]
required

The messages to append to the completion messages when running the evaluation.

variables
object
required

The template variables added to the prompt when executing the prompt.

weight
number
default:1

How heavily to weigh the evaluation within the prompt.

Required range: 0 <= x <= 1
threshold
number
default:1

What percentage of assertions must pass for the evaluation to pass.

Required range: 0 <= x <= 1