Files
qdrant-client/tests/test_fastembed.py
George 790328b1aa new: remove add and query methods (#1210)
* new: deprecate add and query methods

* fix: update async client generator
2026-05-20 22:48:47 +07:00

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")