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:
parent
2dc825b3cb
commit
dda86449fa
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue