mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-03-11 10:17:56 +08:00
## Summary This PR fixes two runtime bugs in agent components: **Bug 1: `agent/component/invoke.py` — `NameError` in POST + `clean_html` path** The POST method's `clean_html` branch uses the variable `sections` without ever defining it. Both the GET and PUT branches correctly call `sections = HtmlParser()(None, response.content)` before referencing `sections`, but this line was missing from the POST branch (copy-paste omission). This causes a `NameError` whenever a user configures an Invoke component with `method="post"` and `clean_html=True`. **Bug 2: `agent/component/data_operations.py` — `AttributeError` in `_recursive_eval`** The `_recursive_eval` method recursively calls `self.recursive_eval()` (without the leading underscore) instead of `self._recursive_eval()`. Since the method is defined as `_recursive_eval`, this causes an `AttributeError` at runtime when the `literal_eval` operation processes nested dicts or lists. ## Test plan - [ ] Configure an Invoke node with `method=post` and `clean_html=True`, verify HTML is parsed correctly without `NameError` - [ ] Configure a DataOperations node with `operations=literal_eval` on nested data, verify no `AttributeError` --------- Signed-off-by: JiangNan <1394485448@qq.com>