Skip to content

Feat: Redesign and refactor agent module - #9113

Merged
KevinHuSh merged 110 commits into
infiniflow:mainfrom
KevinHuSh:main
Jul 30, 2025
Merged

KevinHuSh merged 110 commits into
infiniflow:mainfrom
KevinHuSh:main

Conversation

@KevinHuSh

@KevinHuSh KevinHuSh commented Jul 30, 2025 •

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

#9082 #6365

WARNING: it's not compatible with the older version of Agent module, which means that Agent from older versions can not work anymore.

Type of change

  • New Feature (non-breaking change which adds functionality)

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. 💞 feature Feature request, pull request that fullfill a new feature. labels Jul 30, 2025
@KevinHuSh KevinHuSh added the ci Continue Integration label Jul 30, 2025
@yingfeng yingfeng changed the title Feat: Redesign and refactor our agent module Feat: Redesign and refactor agent module Jul 30, 2025
@KevinHuSh
KevinHuSh merged commit d9fe279 into infiniflow:main Jul 30, 2025
@dosubot dosubot Bot mentioned this pull request Aug 9, 2025
4 tasks done
clifftseng pushed a commit to clifftseng/ragflow that referenced this pull request Feb 9, 2026
### What problem does this PR solve?

infiniflow#9082 infiniflow#6365

<u> **WARNING: it's not compatible with the older version of `Agent`
module, which means that `Agent` from older versions can not work
anymore.**</u>

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
yuzhichang added a commit that referenced this pull request Jun 28, 2026
## Summary

#16332 fixed the missing `return` in DeepL's except branch, but
`ComponentBase.be_output` was removed during the agent refactor (#9113)
while several components still call it. DeepL (and other tools) would
raise `AttributeError` before any error message could be returned.

- Restore `ComponentBase.be_output` as `pd.DataFrame([{"content": v}])`
(same as pre-refactor behavior)
- Add regression test that `_run` returns the `**Error**:` message when
translation fails

Related to #16329

## Test plan

- [x] `test_run_returns_error_on_translation_failure`
- [x] Existing `test_deepl.py` check() tests still pass

---------

Co-authored-by: Harsh Kashyap <[email protected]>
Co-authored-by: Zhichang Yu <[email protected]>
yuzhichang added a commit that referenced this pull request Jun 29, 2026
## Summary

#16332 fixed the missing `return` in DeepL's except branch, but
`ComponentBase.be_output` was removed during the agent refactor (#9113)
while several components still call it. DeepL (and other tools) would
raise `AttributeError` before any error message could be returned.

- Restore `ComponentBase.be_output` as `pd.DataFrame([{"content": v}])`
(same as pre-refactor behavior)
- Add regression test that `_run` returns the `**Error**:` message when
translation fails

Related to #16329

## Test plan

- [x] `test_run_returns_error_on_translation_failure`
- [x] Existing `test_deepl.py` check() tests still pass

---------

Co-authored-by: Harsh Kashyap <[email protected]>
Co-authored-by: Zhichang Yu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration 💞 feature Feature request, pull request that fullfill a new feature. size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant