fix(architect): groundedness API — remaining correction→mitigating fixes

Apply 3 additional parameter renames missed in main KB update:
- SDK: correction=True → mitigating=True
- SDK: response.corrected_text → response.correction_text
- JSON body: 'correction': false → 'mitigating': false

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-04-09 22:45:50 +02:00
commit dda86449fa

View file

@ -174,7 +174,7 @@ response = client.text_detect_groundedness(
text=llm_response,
grounding_sources=retrieved_docs,
reasoning=True,
correction=True,
mitigating=True,
llm_resource={
"resourceType": "AzureOpenAI",
"azureOpenAIEndpoint": aoai_endpoint,
@ -183,7 +183,7 @@ response = client.text_detect_groundedness(
)
if response.ungrounded_detected:
final_response = response.corrected_text
final_response = response.correction_text
else:
final_response = llm_response
```
@ -352,7 +352,7 @@ Content-Type: application/json
"text": "<LLM output>",
"groundingSources": ["<doc1>", "<doc2>"],
"reasoning": false,
"correction": false
"mitigating": false
}
```