Skip to content

Commit 2e1969d

Browse files
committed
Try loading the embedding model explicitly
1 parent afad96d commit 2e1969d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ dependencies = [
2727
"numba>=0.60.0",
2828
"nanoid>=2.0.0",
2929
"mcp>=1.6.0",
30+
"sentence-transformers>=2.5.0",
3031
]
3132

3233
[project.optional-dependencies]

redis_memory_server/extraction.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ def get_topic_model() -> BERTopic:
2828
"""
2929
global _topic_model
3030
if _topic_model is None:
31-
_topic_model = BERTopic.load(settings.topic_model)
31+
# TODO: Expose this as a config option
32+
_topic_model = BERTopic.load(
33+
settings.topic_model, embedding_model="all-MiniLM-L6-v2"
34+
)
3235
return _topic_model # type: ignore
3336

3437

0 commit comments

Comments
 (0)