Commit 0f4dfd8
committed
fix: improve BaseChatMemory interface compatibility with ReactAgent
- Enhanced get_context() method in BaseChatMemory with full ReactAgent compatibility
- Added query parameter for optional keyword search
- Added max_tokens parameter for context size limit
- Added use_search parameter to enable/disable search
- Maintained backward compatibility with max_messages parameter
- Updated ReactAgent to support both memory interfaces
- Accepts BaseMemory (legacy v0.9.x interface)
- Accepts BaseChatMemory (new v0.10.0 interface)
- Automatic conversion via ChatToLegacyAdapter when needed
- Updated type hints to Union[BaseMemory, BaseChatMemory]
- Added necessary imports to ReactAgent
- BaseChatMemory for type checking
- ChatToLegacyAdapter for automatic interface conversion
- Improved documentation
- Better docstring for memory parameter in ReactAgent.__init__()
- Clear explanation of interface support
- Added EXAMPLES_GUIDE.md
- Complete guide for running all framework examples
- Detailed explanations of each example
- Prerequisites and usage instructions
- Memory system v0.10.0 migration guide
Bumped version: 0.10.0 → 0.10.1 (PATCH - bugfix)
Maintains 100% backward compatibility with v0.10.0 and v0.9.x1 parent 2eb477e commit 0f4dfd8
6 files changed
Lines changed: 947 additions & 10 deletions
File tree
- react_agent_framework
- core
- memory/chat
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
8 | 38 | | |
9 | 39 | | |
10 | 40 | | |
| |||
0 commit comments