Executes the web scraping and searching process. Returns: str: The answer to the prompt.
(self)
| 101 | ) |
| 102 | |
| 103 | def run(self) -> str: |
| 104 | """ |
| 105 | Executes the web scraping and searching process. |
| 106 | |
| 107 | Returns: |
| 108 | str: The answer to the prompt. |
| 109 | """ |
| 110 | |
| 111 | inputs = {"user_prompt": self.prompt} |
| 112 | self.final_state, self.execution_info = self.graph.execute(inputs) |
| 113 | |
| 114 | # Store the URLs after execution |
| 115 | if "urls" in self.final_state: |
| 116 | self.considered_urls = self.final_state["urls"] |
| 117 | |
| 118 | return self.final_state.get("answer", "No answer found.") |
| 119 | |
| 120 | def get_considered_urls(self) -> List[str]: |
| 121 | """ |