kaxil opened a new pull request, #74737:
URL: https://github.com/apache/airflow/pull/74737

   The Common AI approval-gates guide explained every parameter but never 
showed the reviewer's side: where a pending review appears, what the form 
contains, and what each answer does to the task and to the tasks after it. This 
adds that walkthrough to `approval_gates.rst`, built around a complete Dag a 
reader can copy: an `LLMOperator` with `require_approval=True` and 
`allow_modifications=True`, its input in the snippet, and a downstream 
`publish` task that receives the approved text.
   
   ![Review form for 
draft_release_note](./providers/common/ai/docs/img/approval_review_form.png)
   
   The page shows the Required Actions list and the review form, then a table 
of what approve, edit-then-approve, reject and the three `on_approval_timeout` 
settings do: the resulting task state, the line the task logs when it resumes, 
and whether `publish` runs and with what text. Every state, log line and 
screenshot comes from a run on main (breeze, LocalExecutor). The connection 
pointed at a local stand-in for the OpenAI API so no key was needed, and the 
page says a real model's wording will differ.
   
   The Dag is a new `example_llm_approval.py` instead of wider markers in 
`example_llm.py`, because that file's shared import block also pulls in 
`UsageLimits`, `Decimal` and `BaseModel`, so no marker range there gives a 
copyable Dag with its imports. The existing notifier example in 
`example_llm.py` stays where it was, now under a Timeouts heading.
   
   Running it also turned up a version split the docs didn't mention. Since 
#73235 (3.4.0b1), a retried or cleared task rewrites the open review: subject, 
body, editable output and assigned users. On 3.1 to 3.3 the review keeps the 
first attempt's, so with `allow_modifications=True`, approving it unedited 
returns the first attempt's output. The guide, the `operators/llm.rst` 
parameter list and the `LLMOperator` and `LLMApprovalMixin` docstrings stated 
the older behaviour for every version; they now say which version does what.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to