mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-17 07:26:16 +00:00
partners: update deps for langchain-chroma (#31251)
Updates dependencies to Chroma to integrate the major release of Chroma with improved performance, and to fix issues users have been seeing using the latest chroma docker image with langchain-chroma https://github.com/langchain-ai/langchain/issues/31047#issuecomment-2850790841 Updates chromadb dependency to >=1.0.9 This also removes the dependency of chroma-hnswlib, meaning it can run against python 3.13 runners for tests as well. Tested this by pulling the latest Chroma docker image, running langchain-chroma using client mode ``` httpClient = chromadb.HttpClient(host="localhost", port=8000) vector_store = Chroma( client=httpClient, collection_name="test", embedding_function=embeddings, ) ```
This commit is contained in:
committed by
GitHub
parent
a8f2ddee31
commit
aa4890c136
@@ -12,7 +12,7 @@ import chromadb
|
||||
import pytest # type: ignore[import-not-found]
|
||||
import requests
|
||||
from chromadb.api.client import SharedSystemClient
|
||||
from chromadb.api.segment import SegmentAPI
|
||||
from chromadb.api.rust import RustBindingsAPI
|
||||
from chromadb.api.types import Embeddable
|
||||
from langchain_core.documents import Document
|
||||
from langchain_core.embeddings.fake import FakeEmbeddings as Fak
|
||||
@@ -311,9 +311,8 @@ def test_chroma_with_persistence() -> None:
|
||||
# to be able to delete the files after testing
|
||||
client = docsearch._client
|
||||
assert isinstance(client, chromadb.ClientCreator)
|
||||
assert isinstance(client._server, SegmentAPI)
|
||||
client._server._sysdb.stop()
|
||||
client._server._manager.stop()
|
||||
assert isinstance(client._server, RustBindingsAPI)
|
||||
client._server.stop()
|
||||
|
||||
|
||||
def test_chroma_with_persistence_with_client_settings() -> None:
|
||||
@@ -358,9 +357,8 @@ def test_chroma_with_persistence_with_client_settings() -> None:
|
||||
# to be able to delete the files after testing
|
||||
client = docsearch._client
|
||||
assert isinstance(client, chromadb.ClientCreator)
|
||||
assert isinstance(client._server, SegmentAPI)
|
||||
client._server._sysdb.stop()
|
||||
client._server._manager.stop()
|
||||
assert isinstance(client._server, RustBindingsAPI)
|
||||
client._server.stop()
|
||||
|
||||
|
||||
def test_chroma_mmr() -> None:
|
||||
|
Reference in New Issue
Block a user