Skip to content

Commit

Permalink
🔥 fix(perf): bug with is_dupe
Browse files Browse the repository at this point in the history
  • Loading branch information
mxchinegod committed Jan 10, 2024
1 parent 491bbbc commit d264e6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion magnet/ic/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def on(self, category: str = 'no_category', stream: str = 'documents', cre
self.category = category
self.stream = stream
try:
nc = await nats.connect(f'{self.server}')
nc = await nats.connect(f'nats://{self.server}:4222')
self.nc = nc
self.js = self.nc.jetstream()
self.js.purge_stream
Expand Down
2 changes: 1 addition & 1 deletion magnet/ize/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def is_dupe(self, q):
Returns:
bool: True if the query embedding is a duplicate in the Milvus database, False otherwise.
"""
match = self.collection.search(
match = self.db.collection.search(
data=[q]
, anns_field = "embeddings"
, param=self.config['INDEX_PARAMS']
Expand Down

0 comments on commit d264e6d

Please sign in to comment.