update: chroma v0.4.0 (#330)

This commit is contained in:
Candido Sales Gomes
2023-07-20 17:17:53 -04:00
committed by GitHub
parent cdbf75e0ec
commit d590e4423b
3 changed files with 10 additions and 17 deletions

View File

@@ -6,6 +6,7 @@ from unittest.mock import patch
from embedchain import App
from embedchain.config import AppConfig
from embedchain.vectordb.chroma_db import ChromaDB, chromadb
from chromadb.config import Settings
class TestChromaDbHosts(unittest.TestCase):
@@ -19,10 +20,9 @@ class TestChromaDbHosts(unittest.TestCase):
with patch.object(chromadb, "Client") as mock_client:
_db = ChromaDB(host=host, port=port, embedding_fn=len)
expected_settings = chromadb.config.Settings(
chroma_api_impl="rest",
chroma_server_host=host,
chroma_server_http_port=port,
expected_settings = Settings(
chroma_server_host="test-host",
chroma_server_http_port="1234",
)
mock_client.assert_called_once_with(expected_settings)