| 38 | relative_url_pattern = re.compile(r"[\(](/[^\(\)\s]*)") |
| 39 | |
| 40 | def __init__( |
| 41 | self, |
| 42 | input: str, |
| 43 | output: List[str], |
| 44 | node_config: Optional[dict] = None, |
| 45 | node_name: str = "ParseNode", |
| 46 | ): |
| 47 | super().__init__(node_name, "node", input, output, 1, node_config) |
| 48 | |
| 49 | self.verbose = ( |
| 50 | False if node_config is None else node_config.get("verbose", False) |
| 51 | ) |
| 52 | self.parse_html = ( |
| 53 | True if node_config is None else node_config.get("parse_html", True) |
| 54 | ) |
| 55 | self.parse_urls = ( |
| 56 | False if node_config is None else node_config.get("parse_urls", False) |
| 57 | ) |
| 58 | |
| 59 | self.llm_model = node_config.get("llm_model") |
| 60 | self.chunk_size = node_config.get("chunk_size") |
| 61 | |
| 62 | def execute(self, state: dict) -> dict: |
| 63 | """ |