Collects user input for the poem generation process.
(
state: State, max_drafts: int, poem_types: List[str], poem_subject: str
)
| 149 | ], |
| 150 | ) |
| 151 | def user_input( |
| 152 | state: State, max_drafts: int, poem_types: List[str], poem_subject: str |
| 153 | ) -> Tuple[dict, State]: |
| 154 | """Collects user input for the poem generation process.""" |
| 155 | return { |
| 156 | "max_drafts": max_drafts, |
| 157 | "poem_types": poem_types, |
| 158 | "poem_subject": poem_subject, |
| 159 | }, state.update(max_drafts=max_drafts, poem_types=poem_types, poem_subject=poem_subject) |
| 160 | |
| 161 | |
| 162 | @action(reads=["max_drafts", "poem_types", "poem_subject"], writes=["proposals"]) |