Executes the web scraping process and returns the answer to the prompt. Returns: str: The answer to the prompt.
(self)
| 85 | ) |
| 86 | |
| 87 | def run(self) -> str: |
| 88 | """ |
| 89 | Executes the web scraping process and returns the answer to the prompt. |
| 90 | |
| 91 | Returns: |
| 92 | str: The answer to the prompt. |
| 93 | """ |
| 94 | |
| 95 | inputs = {"user_prompt": self.prompt, self.input_key: self.source} |
| 96 | self.final_state, self.execution_info = self.graph.execute(inputs) |
| 97 | |
| 98 | return self.final_state.get("answer", "No answer found.") |