- Documentation
- API Reference
- POSTGet Model Parameters
- GETGet Prompt
- PUTUpdate Prompt
- DELDelete Prompt
- GETList Prompts
- POSTCreate Prompt
- GETList tools
- POSTCreates tool
- GETGet Tool
- PUTUpdate tool
- DELDelete tool
- GETList Evaluation Assertions
- POSTCreate Evaluation Assertion
- GETGet Evaluation Assertion
- PUTUpdate Evaluation Assertion
- DELDelete Evaluation Assertion
- GETList Evaluations
- POSTCreate Evaluation
- GETGet Evaluation
- PUTUpdate Evaluation
- DELDelete Evaluation
API Reference
Create Evaluation
Create a new evaluation.
The messages to append to the completion messages when running the evaluation.
The template variables added to the prompt when executing the prompt.
curl --request POST \
--url https://api.promptfoundry.ai/sdk/v1/evaluations \
--header 'Content-Type: application/json'
{
"id": "<string>",
"promptId": "<string>",
"appendedMessages": [
{
"content": "<string>",
"role": "assistant",
"toolCallId": "<string>",
"toolCalls": [
{
"toolCallId": "<string>",
"type": "function",
"function": {
"arguments": "<string>",
"name": "<string>"
}
}
]
}
],
"variables": {}
}
Body
The messages to append to the completion messages when running the evaluation.
Example: "Hello, {{city}}!"
assistant
, system
, tool
, user
TOOL_CALL_1
The type of the tool. Currently, only function
is supported.
function
The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
The name of the function to call.
The template variables added to the prompt when executing the prompt.
Response
The messages to append to the completion messages when running the evaluation.
Example: "Hello, {{city}}!"
assistant
, system
, tool
, user
TOOL_CALL_1
The type of the tool. Currently, only function
is supported.
function
The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
The name of the function to call.
The template variables added to the prompt when executing the prompt.
curl --request POST \
--url https://api.promptfoundry.ai/sdk/v1/evaluations \
--header 'Content-Type: application/json'
{
"id": "<string>",
"promptId": "<string>",
"appendedMessages": [
{
"content": "<string>",
"role": "assistant",
"toolCallId": "<string>",
"toolCalls": [
{
"toolCallId": "<string>",
"type": "function",
"function": {
"arguments": "<string>",
"name": "<string>"
}
}
]
}
],
"variables": {}
}