Skip to content

Commit

Permalink
bugfix python 3.10, v3.11.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nayjest committed Nov 18, 2024
1 parent 567f086 commit ed287d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion microcore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ def has_content(self, collection: str) -> bool:
# "wrappers",
]

__version__ = "3.11.0"
__version__ = "3.11.1"
4 changes: 1 addition & 3 deletions microcore/embedding_db/chromadb.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from dataclasses import dataclass
import uuid
from typing import Optional

import chromadb
from chromadb.api.models import Collection
from chromadb.config import Settings
from chromadb.errors import ChromaError
from chromadb.utils import embedding_functions
Expand Down Expand Up @@ -130,7 +128,7 @@ def get_all(self, collection: str) -> list[str | SearchResult]:
def collection_exists(self, collection: str) -> bool:
return self._get_collection(collection) is not None

def _get_collection(self, name: str, create: bool = False) -> Optional[Collection]:
def _get_collection(self, name: str, create: bool = False):
if create:
return self.client.get_or_create_collection(
name=name, embedding_function=self.embedding_function
Expand Down

0 comments on commit ed287d8

Please sign in to comment.