Skip to content

Commit 0f4dfd8

Browse files
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.x
1 parent 2eb477e commit 0f4dfd8

6 files changed

Lines changed: 947 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,36 @@ Todas as mudanças notáveis neste projeto serão documentadas neste arquivo.
55
O formato é baseado em [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/),
66
e este projeto adere ao [Semantic Versioning](https://semver.org/lang/pt-BR/).
77

8+
## [0.10.1] - 2025-01-11
9+
10+
### 🐛 Correções
11+
12+
- **Interface BaseChatMemory**: Melhorado método `get_context()` para suportar parâmetros compatíveis com ReactAgent
13+
- Adicionado parâmetro `query` (busca com palavra-chave opcional)
14+
- Adicionado parâmetro `max_tokens` (limite de tokens no contexto)
15+
- Adicionado parâmetro `use_search` (ativar/desativar busca)
16+
- Mantida retrocompatibilidade com `max_messages`
17+
18+
- **ReactAgent**: Suporte completo para ambas interfaces de memória
19+
- Aceita `BaseMemory` (interface antiga/legada)
20+
- Aceita `BaseChatMemory` (interface nova v0.10.0)
21+
- Conversão automática via `ChatToLegacyAdapter` quando necessário
22+
- Type hints atualizados: `Union[BaseMemory, BaseChatMemory]`
23+
24+
- **Imports**: Adicionados imports necessários em `ReactAgent`
25+
- `BaseChatMemory` para type checking
26+
- `ChatToLegacyAdapter` para conversão automática
27+
28+
### 📝 Documentação
29+
30+
- Melhorada documentação do parâmetro `memory` em `ReactAgent.__init__()`
31+
- Explicação clara sobre suporte a ambas interfaces
32+
33+
### 🔧 Técnico
34+
35+
Esta é uma versão PATCH (bugfix) que corrige incompatibilidades de interface sem quebrar código existente.
36+
Mantém 100% de retrocompatibilidade com v0.10.0 e v0.9.x.
37+
838
## [0.10.0] - 2025-01-10
939

1040
### 🎯 BREAKING CHANGES

0 commit comments

Comments
 (0)