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