Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

style: minor fix typo in ChatHistoryBlock (#2500)

EmptyRabbitb425b4c94242
diff --git a/camel/memories/blocks/chat_history_block.py b/camel/memories/blocks/chat_history_block.py
index aa2df6533..bb0abb4ef 100644
--- a/camel/memories/blocks/chat_history_block.py
+++ b/camel/memories/blocks/chat_history_block.py
@@ -73,7 +73,6 @@ class ChatHistoryBlock(MemoryBlock):
warnings.warn("The `ChatHistoryMemory` is empty.")
return list()
- chat_records: List[MemoryRecord] = []
if window_size is not None and window_size >= 0:
# Initial preserved index: Keep first message
# if it's SYSTEM/DEVELOPER (index 0)
@@ -117,7 +116,7 @@ class ChatHistoryBlock(MemoryBlock):
# Return full records when no window restriction
final_records = record_dicts
- chat_records = [
+ chat_records: List[MemoryRecord] = [
MemoryRecord.from_dict(record) for record in final_records
]