Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

⚡️ Speed up `get_word_count()` by 6% in `embedchain/chunkers/base_chunker.py` (#1268)

Saurabh Misra1354747ca8ba
diff --git a/embedchain/chunkers/base_chunker.py b/embedchain/chunkers/base_chunker.py
index d7d4987d8..274ae5475 100644
--- a/embedchain/chunkers/base_chunker.py
+++ b/embedchain/chunkers/base_chunker.py
@@ -84,4 +84,4 @@ class BaseChunker(JSONSerializable):
@staticmethod
def get_word_count(documents) -> int:
- return sum([len(document.split(" ")) for document in documents])
+ return sum(len(document.split(" ")) for document in documents)