reports
Configure Custom Scoring
patch/reports/{report_id}/score-card
Request
- Base URLhttps://docs.promptlayer.com (the document declares no server; this is the origin it was published from)
- AuthAPI key in header X-API-KEY
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
report_idinteger required
ID of the evaluation pipeline to update.
Request body
Response
Score card updated.
Example response
{
"report": {
"score_configuration": {
"code": "score = sum(1 for row in data if row.get(\"Accuracy Check\") is True) / len(data) * 100 if data else 0\nreturn {\"score\": score}",
"code_language": "PYTHON"
}
}
}Changes
No recorded changes to this operation across all 3 revisions of this API.