feat: add support for dict-type code implementations in assign_code_list_to_evo #1222
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Enhanced the
assign_code_list_to_evomethod to support both string and dictionary types for code implementations. The method now properly handles:factor.pyMotivation and Context
The original implementation only supported string-type code, which limited the flexibility of code injection. This enhancement allows the method to work with existing implementations from the knowledge base (dict format) as well as new implementations (string format), improving the system's ability to reuse and manage code implementations.
How Has This Been Tested?
The enhanced method now properly handles both data types while maintaining backward compatibility with existing string-based implementations.
Screenshots of Test Results (if appropriate):
No screenshots needed as this is a code enhancement that extends existing functionality.
Types of changes
📚 Documentation preview 📚: https://RDAgent--1222.org.readthedocs.build/en/1222/