Failed to get sample code from the evals guide working. The final cURL yields this error:
{
"error": {
"message": "Invalid body: failed to parse JSON value. Please check the value to ensure it is valid JSON. (Common errors include trailing commas, missing closing brackets, missing quotation marks, etc.)",
"type": "invalid_request_error",
"param": null,
"code": "invalid_json"
}
}%
Here’s the cURL with valid file and eval ids for reference:
curl https://api.openai.com/v1/evals/eval_680eb00f863c8190b85e168f0c492fc3/runs \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Categorization text run",
"data_source": {
"type": "completions",
"model": "gpt-4.1",
"input": [
{
"role": "developer",
"content": "You are an expert in categorizing IT support tickets. Given the support ticket below, categorize the request into one of \"Hardware\", \"Software\", or \"Other\". Respond with only one of those words."
},
{
"role": "user",
"content": "\{\{ item.ticket_text \}\}"
}
],
"source": {
"type": "file_id",
"id": "file-EvVfxH6tNYuRsZVAD1jKUY"
}
}
}'