Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: patch queueinginterface duplication bug (#1702)
Charles Packer512315800c2c
diff --git a/memgpt/server/rest_api/interface.py b/memgpt/server/rest_api/interface.pyindex 782d8d3dd..4b5b9d355 100644--- a/memgpt/server/rest_api/interface.py+++ b/memgpt/server/rest_api/interface.py@@ -95,6 +95,18 @@ class QueuingInterface(AgentInterface):breakif len(items) > 1 and items[-1] == "STOP":items.pop()++ # If the style is "obj", then we need to deduplicate any messages+ # Filter down items for duplicates based on item.id+ if style == "obj":+ seen_ids = set()+ unique_items = []+ for item in reversed(items):+ if item.id not in seen_ids:+ seen_ids.add(item.id)+ unique_items.append(item)+ items = list(reversed(unique_items))+return itemsdef clear(self):