MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/optillm / __init__

Method __init__

optillm/plugins/memory_plugin.py:10–15  ·  view source on GitHub ↗
(self, max_size: int = 100)

Source from the content-addressed store, hash-verified

8
9class Memory:
10 def __init__(self, max_size: int = 100):
11 self.max_size = max_size
12 self.items: List[str] = []
13 self.vectorizer = TfidfVectorizer()
14 self.vectors = None
15 self.completion_tokens = 0
16
17 def add(self, item: str):
18 if len(self.items) >= self.max_size:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected