AdAckResponse
AdAckResponse is the parsed output object returned by successful acknowledgment
calls. It tells your application that Adstract accepted the acknowledgment and
how that acknowledgment was normalized on the backend.
Class purpose
This class exists to make acknowledgment handling explicit:
- the acknowledgment record identifier is always returned;
- the normalized backend outcome is surfaced through
status; and - the final acknowledgment result is exposed through
success.
Class shape
- Python
ack = client.acknowledge(
enhancement_result=result,
llm_response=llm_response,
)
Field reference
-
ad_ack_id- Type:
str - Meaning: Unique identifier of the created acknowledgment record.
- Behavior:
- Present on all successful acknowledgment responses.
- Type:
-
status- Type:
str - Meaning: Normalized acknowledgment outcome returned by Adstract.
- Behavior:
okwhen acknowledgment completed normally.no_ad_usedwhen acknowledgment completed successfully but the final LLM response did not use the ad.recoverable_errorwhen Adstract accepted the acknowledgment but encountered a recoverable issue in follow-up backend processing.
- Type:
-
success- Type:
bool - Meaning: Whether the acknowledgment itself completed successfully.
- Behavior:
Truewhenstatusisokorno_ad_used.Falsewhenstatusisrecoverable_error.
- Type:
Handling pattern
- Python
if ack is not None:
print(ack.ad_ack_id)
if ack.success:
print(ack.status)
else:
print(ack.status)
Next steps
- Continue to Synchronous Acknowledgment for sync acknowledgment flow.
- Continue to Asynchronous Acknowledgment for async acknowledgment flow.
- Continue to Exception for acknowledgment error type behavior.
- Continue to Finishing and Lifecycle to close the client cleanly.