Coverage for src / lexigram / contracts / data / vector / enums.py: 0%

19 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-08-15 18:57 +0800

1"""Vector store enumerations.""" 

2 

3from __future__ import annotations 

4 

5from enum import StrEnum 

6 

7 

8class DistanceMetric(StrEnum): 

9 """Distance function used for similarity search.""" 

10 

11 COSINE = "cosine" 

12 EUCLIDEAN = "euclidean" 

13 DOT_PRODUCT = "dot_product" 

14 MANHATTAN = "manhattan" 

15 

16 

17class IndexType(StrEnum): 

18 """Vector index algorithm.""" 

19 

20 FLAT = "flat" 

21 HNSW = "hnsw" 

22 IVFFLAT = "ivfflat" 

23 ANNOY = "annoy" 

24 

25 

26class IndexState(StrEnum): 

27 """Current state of a vector index/collection.""" 

28 

29 CREATING = "creating" 

30 READY = "ready" 

31 UPDATING = "updating" 

32 ERROR = "error" 

33 DELETING = "deleting" 

34 

35 

36__all__ = [ 

37 "DistanceMetric", 

38 "IndexState", 

39 "IndexType", 

40]