mirror of
https://github.com/qdrant/qdrant-client.git
synced 2026-07-23 11:11:01 -05:00
22 lines
702 B
Python
22 lines
702 B
Python
import pytest
|
|
|
|
from qdrant_client import QdrantClient
|
|
|
|
|
|
def test_get_embedding_size():
|
|
local_client = QdrantClient(":memory:")
|
|
|
|
if not local_client._FASTEMBED_INSTALLED:
|
|
pytest.skip("FastEmbed is not installed, skipping test")
|
|
|
|
assert local_client.get_embedding_size(model_name="BAAI/bge-base-en-v1.5") == 768
|
|
|
|
assert local_client.get_embedding_size(model_name="Qdrant/resnet50-onnx") == 2048
|
|
|
|
assert local_client.get_embedding_size(model_name="colbert-ir/colbertv2.0") == 128
|
|
|
|
with pytest.raises(
|
|
ValueError, match="Sparse embeddings do not return fixed embedding size and distance type"
|
|
):
|
|
local_client.get_embedding_size(model_name="Qdrant/bm25")
|