revise()
Revise the content and approve the review.
Usage
revise(
review,
revised_content,
*,
feedback="",
decided_by="",
)Use when the human wants to modify the agent’s output before proceeding.
Parameters
review: HumanReview-
The review to revise.
revised_content: str-
The corrected or modified content to use instead.
feedback: str = ""-
Feedback explaining the revision.
decided_by: str = ""- Identifier for the human making the decision.
Returns
ReviewDecision- The revision decision.
Raises
ValueError- If the review has already been resolved.
Examples
import talk_box as tb
review = tb.human_review("Refund $500", agent="billing_bot")
decision = tb.revise(review, "Refund $250", feedback="Partial refund only")
review.final_content # "Refund $250"
review.is_approved # True (revised counts as approved)