Update span score

Updates an existing score for a specific log. - `numerical_value` *number*: Optional updated numerical score value. - `string_value` *string*: Optional updated string score value. - `boolean_value` *boolean*: Optional updated boolean score value. - `categorical_value` *array*: Optional updated categorical score value (array of strings). Use when evaluator's `score_value_type` is `categorical`. ```Python Python url = "https://api.respan.ai/api/logs/{log_id}/scores/{score_id}/" api_key = "YOUR_KEY" # Replace with your actual Respan API key data = { "numerical_value": 4.8, "string_value": "Excellent quality" } headers = { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" } response = requests.patch(url, headers=headers, json=data) print(response.json()) ``` ```json Request { "numerical_value": 4.8, "string_value": "Excellent quality" } ``` ```json 200 OK { "id": "eval_result_unique_id", "created_at": "2024-01-15T10:30:00Z", "type": "llm", "environment": "test", "numerical_value": 4.8, "string_value": "Excellent quality", "boolean_value": true, "is_passed": false, "cost": 0.0, "evaluator_id": null, "evaluator_slug": "quality_evaluator", "log_id": "log_unique_id", "dataset_id": null } ```

Authentication

AuthorizationBearer
API key authentication. Get your API key from https://platform.respan.ai/platform/api-keys

Path parameters

log_idstringRequired
Log Id
score_idstringRequired
Score Id

Request

This endpoint expects an object.
numerical_valuedoubleOptional
Optional updated numerical score value.
string_valuestringOptional
Optional updated string score value.
boolean_valuebooleanOptional
Optional updated boolean score value.
categorical_valuelist of stringsOptional

Optional updated categorical score value (array of strings). Use when evaluator’s score_value_type is categorical.

Response

Successful response for Update span score

Errors

401
Unauthorized Error