-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/bump chromadb dep to 0.5.0 (#700)
* [DEP]: Bump chromadb version Remove specific version pin * Fix: chromadb tests failing due to sort order variance Fix: linting error * Add OllamaEmbeddingFunction to function registry Linting
- Loading branch information
Showing
3 changed files
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# SPDX-FileCopyrightText: 2023-present John Doe <[email protected]> | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
import operator | ||
import uuid | ||
from typing import List | ||
from unittest import mock | ||
|
@@ -56,6 +57,9 @@ def assert_documents_are_equal(self, received: List[Document], expected: List[Do | |
This can happen for example when the Document Store sets a score to returned Documents. | ||
Since we can't know what the score will be, we can't compare the Documents reliably. | ||
""" | ||
received.sort(key=operator.attrgetter("id")) | ||
expected.sort(key=operator.attrgetter("id")) | ||
|
||
for doc_received, doc_expected in zip(received, expected): | ||
assert doc_received.content == doc_expected.content | ||
assert doc_received.meta == doc_expected.meta | ||
|