Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community[patch]: Revert " Fix the bug that Chroma does not specify `e… #19866

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions libs/community/langchain_community/vectorstores/chroma.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import chromadb.config
from chromadb.api.types import ID, OneOrMany, Where, WhereDocument


logger = logging.getLogger()
DEFAULT_K = 4 # Number of Documents to return.

Expand Down Expand Up @@ -81,7 +80,6 @@ def __init__(
try:
import chromadb
import chromadb.config
from chromadb.utils import embedding_functions
except ImportError:
raise ImportError(
"Could not import chromadb python package. "
Expand Down Expand Up @@ -124,12 +122,10 @@ def __init__(
_client_settings.persist_directory or persist_directory
)

self._embedding_function = (
embedding_function or embedding_functions.DefaultEmbeddingFunction()
)
self._embedding_function = embedding_function
self._collection = self._client.get_or_create_collection(
name=collection_name,
embedding_function=self._embedding_function,
embedding_function=None,
metadata=collection_metadata,
)
self.override_relevance_score_fn = relevance_score_fn
Expand Down