mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-07 02:58:21 +00:00
fix: Add test support for qdrant provider
Signed-off-by: Bill Murdock <bmurdock@redhat.com>
This commit is contained in:
parent
eeae5f6cbc
commit
c6aae0f81b
2 changed files with 23 additions and 2 deletions
|
@ -51,7 +51,7 @@ DEFAULT_PROVIDER_COMBINATIONS = [
|
|||
),
|
||||
pytest.param(
|
||||
{
|
||||
"inference": "bedrock",
|
||||
"inference": "ollama",
|
||||
"vector_io": "qdrant",
|
||||
},
|
||||
id="qdrant",
|
||||
|
|
|
@ -13,10 +13,12 @@ import pytest_asyncio
|
|||
from llama_stack.apis.models import ModelInput, ModelType
|
||||
from llama_stack.distribution.datatypes import Api, Provider
|
||||
|
||||
|
||||
from llama_stack.providers.inline.vector_io.chroma import ChromaInlineImplConfig
|
||||
from llama_stack.providers.inline.vector_io.faiss import FaissImplConfig
|
||||
from llama_stack.providers.remote.vector_io.chroma import ChromaRemoteImplConfig
|
||||
from llama_stack.providers.remote.vector_io.pgvector import PGVectorConfig
|
||||
from llama_stack.providers.remote.vector_io.qdrant import QdrantConfig
|
||||
from llama_stack.providers.remote.vector_io.weaviate import WeaviateConfig
|
||||
from llama_stack.providers.tests.resolver import construct_stack_for_test
|
||||
from llama_stack.providers.utils.kvstore.config import SqliteKVStoreConfig
|
||||
|
@ -111,7 +113,26 @@ def vector_io_chroma() -> ProviderFixture:
|
|||
)
|
||||
|
||||
|
||||
VECTOR_IO_FIXTURES = ["faiss", "pgvector", "weaviate", "chroma"]
|
||||
@pytest.fixture(scope="session")
|
||||
def vector_io_qdrant() -> ProviderFixture:
|
||||
url = os.getenv("QDRANT_URL")
|
||||
if url:
|
||||
config = QdrantConfig(url=url)
|
||||
provider_type = "remote::qdrant"
|
||||
else:
|
||||
raise ValueError("QDRANT_URL must be set")
|
||||
return ProviderFixture(
|
||||
providers=[
|
||||
Provider(
|
||||
provider_id="qdrant",
|
||||
provider_type=provider_type,
|
||||
config=config.model_dump(),
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
VECTOR_IO_FIXTURES = ["faiss", "pgvector", "weaviate", "chroma", "qdrant"]
|
||||
|
||||
|
||||
@pytest_asyncio.fixture(scope="session")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue