Skip to content

Commit f1bc7b5

Browse files
committed
fix: update deprecated APIs and dependency versions
1 parent 374c80c commit f1bc7b5

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ all = [
106106
"redis (>=6.2.0,<7.0.0)",
107107
"pika (>=1.3.2,<2.0.0)",
108108
"pymysql (>=1.1.0,<2.0.0)",
109-
"chonkie (>=1.0.7,<2.0.0)",
109+
"chonkie (>=1.4.0,<2.0.0)",
110110
"langchain-text-splitters (>=1.0.0,<2.0.0)",
111111
"markitdown[docx,pdf,pptx,xls,xlsx] (>=0.1.1,<0.2.0)",
112112
"pymilvus (>=2.6.1,<3.0.0)",
@@ -119,7 +119,7 @@ all = [
119119
# We kindof don't want users to install them.
120120
"torch (>=2.7.1,<3.0.0)",
121121
"sentence-transformers (>=4.1.0,<5.0.0)",
122-
"qdrant-client (>=1.14.2,<2.0.0)",
122+
"qdrant-client (>=1.16.0,<2.0.0)",
123123
"volcengine-python-sdk (>=4.0.4,<5.0.0)",
124124
"nltk (>=3.9.1,<4.0.0)",
125125
"rake-nltk (>=1.0.6,<1.1.0)",

src/memos/chunkers/sentence_chunker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(self, config: SentenceChunkerConfig):
2121

2222
self.config = config
2323
self.chunker = ChonkieSentenceChunker(
24-
tokenizer_or_token_counter=config.tokenizer_or_token_counter,
24+
tokenizer=config.tokenizer_or_token_counter,
2525
chunk_size=config.chunk_size,
2626
chunk_overlap=config.chunk_overlap,
2727
min_sentences_per_chunk=config.min_sentences_per_chunk,

src/memos/mem_os/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
import time
44

5-
from datetime import datetime
5+
from datetime import datetime, timezone
66
from pathlib import Path
77
from threading import Lock
88
from typing import Any, Literal
@@ -192,7 +192,7 @@ def _register_chat_history(
192192
self.chat_history_manager[user_id] = ChatHistory(
193193
user_id=user_id if user_id is not None else self.user_id,
194194
session_id=session_id if session_id is not None else self.session_id,
195-
created_at=datetime.utcnow(),
195+
created_at=datetime.now(timezone.utc),
196196
total_messages=0,
197197
chat_history=[],
198198
)

src/memos/vec_dbs/qdrant.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ def search(
138138
List of search results with distance scores and payloads.
139139
"""
140140
qdrant_filter = self._dict_to_filter(filter) if filter else None
141-
response = self.client.search(
141+
response = self.client.query_points(
142142
collection_name=self.config.collection_name,
143-
query_vector=query_vector,
143+
query=query_vector,
144144
limit=top_k,
145145
query_filter=qdrant_filter,
146146
with_vectors=True,
147147
with_payload=True,
148-
)
148+
).points
149149
logger.info(f"Qdrant search completed with {len(response)} results.")
150150
return [
151151
VecDBItem(

0 commit comments

Comments
 (0)