GET
/
sdk
/
v1
/
evaluations
/
{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 evaluation = await client.evaluations.get('1212121');

  console.log(evaluation.id);
}

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

Path Parameters

id
string
required
Example:

"1212121"

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