Commit c73b36a
authored
Adding HITL for Flows (#4143)
* feat: introduce human feedback events and decorator for flow methods
- Added HumanFeedbackRequestedEvent and HumanFeedbackReceivedEvent classes to handle human feedback interactions within flows.
- Implemented the @human_feedback decorator to facilitate human-in-the-loop workflows, allowing for feedback collection and routing based on responses.
- Enhanced Flow class to store human feedback history and manage feedback outcomes.
- Updated flow wrappers to preserve attributes from methods decorated with @human_feedback.
- Added integration and unit tests for the new human feedback functionality, ensuring proper validation and routing behavior.
* adding deployment docs
* New docs
* fix printer
* wrong change
* Adding Async Support
feat: enhance human feedback support in flows
- Updated the @human_feedback decorator to use 'message' parameter instead of 'request' for clarity.
- Introduced new FlowPausedEvent and MethodExecutionPausedEvent to handle flow and method pauses during human feedback.
- Added ConsoleProvider for synchronous feedback collection and integrated async feedback capabilities.
- Implemented SQLite persistence for managing pending feedback context.
- Expanded documentation to include examples of async human feedback usage and best practices.
* linter
* fix
* migrating off printer
* updating docs
* new tests
* doc update1 parent 0c02099 commit c73b36a
File tree
24 files changed
+5708
-60
lines changed- docs
- en
- concepts
- learn
- ko
- concepts
- learn
- pt-BR
- concepts
- learn
- lib/crewai
- src/crewai
- events
- types
- utils
- flow
- async_feedback
- persistence
- translations
- tests
24 files changed
+5708
-60
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
| |||
735 | 736 | | |
736 | 737 | | |
737 | 738 | | |
| 739 | + | |
738 | 740 | | |
739 | 741 | | |
740 | 742 | | |
| |||
1171 | 1173 | | |
1172 | 1174 | | |
1173 | 1175 | | |
| 1176 | + | |
1174 | 1177 | | |
1175 | 1178 | | |
1176 | 1179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
575 | 624 | | |
576 | 625 | | |
577 | 626 | | |
| |||
0 commit comments