(
self,
*,
node_id: str,
task: str,
inputs: Optional[str] = None,
metadata: Optional[Dict[str, Any]] = None,
)
| 41 | input_func: Callable[[str], str] = input |
| 42 | |
| 43 | def request( |
| 44 | self, |
| 45 | *, |
| 46 | node_id: str, |
| 47 | task: str, |
| 48 | inputs: Optional[str] = None, |
| 49 | metadata: Optional[Dict[str, Any]] = None, |
| 50 | ) -> PromptResult: |
| 51 | header = ["===== HUMAN INPUT REQUIRED ====="] |
| 52 | if inputs: |
| 53 | header.append("=== Node inputs ===") |
| 54 | header.append(inputs) |
| 55 | header.append(f"=== Task for human ({node_id}) ===") |
| 56 | header.append(task) |
| 57 | header.append("=== Your response: ===") |
| 58 | prompt = "\n".join(header) + "\n" |
| 59 | response = self.input_func(prompt) |
| 60 | return PromptResult( |
| 61 | text=response, |
| 62 | blocks=[MessageBlock.text_block(response or "")], |
| 63 | ) |
| 64 | |
| 65 | |
| 66 | class HumanPromptService: |
nothing calls this directly
no test coverage detected