mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
Carry prompt wellbeing results through answer moderation (#63886)
## What changed Add optional `promptWellbeingResults` to answer moderation metadata. Each result contains the scored input item's ID, labels, and numeric scores. Preserve the results on live agent messages and when rebuilding thread history, and expose them in the app-server v2 schemas and Python SDK models. Ignore malformed wellbeing results when reading stored moderation so the moderation decision and its display instruction can still be applied. ## Testing Cover serialization round trips with and without a display instruction, and verify that older moderation records without wellbeing results deserialize. GitOrigin-RevId: b3ed41fb529e33638eb5486bf2a22ff8b926f82a
This commit is contained in:
+36
@@ -121,6 +121,15 @@
|
||||
},
|
||||
"moderated": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"promptWellbeingResults": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/PromptWellbeingResult"
|
||||
},
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -1233,6 +1242,33 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"PromptWellbeingResult": {
|
||||
"description": "Wellbeing results for a single scored input item.",
|
||||
"properties": {
|
||||
"inputItemId": {
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"scores": {
|
||||
"additionalProperties": {
|
||||
"format": "double",
|
||||
"type": "number"
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"inputItemId",
|
||||
"labels",
|
||||
"scores"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ReasoningEffort": {
|
||||
"description": "A non-empty reasoning effort value advertised by the model.",
|
||||
"minLength": 1,
|
||||
|
||||
Reference in New Issue
Block a user