Constants
gllm_datastore.constants
Contains constants used throughout the gllm_datastore package.
References
NONE
BOOL_FALSE_STR = '0'
module-attribute
BOOL_TRUE_STR = '1'
module-attribute
DEFAULT_FETCH_K = 50
module-attribute
DEFAULT_FUZZY_MATCH_MAX_DISTANCE = 2
module-attribute
DEFAULT_REDIS_QUERY_BATCH_SIZE = 1000
module-attribute
DEFAULT_REQUEST_TIMEOUT = 60
module-attribute
DEFAULT_TOP_K = 10
module-attribute
FIELD_CONFIG_NAME = 'name'
module-attribute
FIELD_CONFIG_TYPE = 'type'
module-attribute
LIST_SEPARATOR = ','
module-attribute
METADATA_PREFIX = 'metadata_'
module-attribute
METADATA_SEPARATOR = '.'
module-attribute
REDIS_DEFAULT_DB = 0
module-attribute
REDIS_DEFAULT_HOST = 'localhost'
module-attribute
REDIS_DEFAULT_PORT = 6379
module-attribute
SIMILARITY_SCORE = 'score'
module-attribute
CHUNK_KEYS
Dictionary-like keys used internally for in-memory chunk representation.
CONTENT = 'content'
class-attribute
instance-attribute
ID = 'id'
class-attribute
instance-attribute
METADATA = 'metadata'
class-attribute
instance-attribute
SCORE = 'score'
class-attribute
instance-attribute
TEXT = 'text'
class-attribute
instance-attribute
VECTOR = 'vector'
class-attribute
instance-attribute
FieldType
Bases: str, Enum
Redis Search field types for filterable fields.
Attributes:
| Name | Type | Description |
|---|---|---|
NUMERIC |
Numeric field type for range queries. |
|
TAG |
Tag field type for exact matching and filtering. |
|
TEXT |
Text field type for full-text search. |
NUMERIC = 'numeric'
class-attribute
instance-attribute
TAG = 'tag'
class-attribute
instance-attribute
TEXT = 'text'
class-attribute
instance-attribute
METADATA_KEYS
Metadata keys used in the cache compatible vector data store.
Attributes:
| Name | Type | Description |
|---|---|---|
EMBEDDINGS |
str
|
Key for the embeddings in the cache. |
DOCUMENTS |
str
|
Key for the documents in the cache. |
METADATA |
str
|
Key for the metadata in the cache. |
ORIGINAL_KEY |
str
|
Key to store the original key value. |
CACHE_VALUE |
str
|
Key for the cached value. |
CACHE_CREATED |
str
|
Key for the timestamp when the cache was created. |
TTL |
str
|
Key for the time-to-live of the cache. |
EXPIRE_AT |
str
|
Key for the expiration time of the cache. |
LAST_USED_AT |
str
|
Key for the last used time of the cache. |
ACCESS_COUNT |
str
|
Key for the access count of the cache. |