-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ beautifulsoup4 | |
huggingface_hub | ||
tiktoken | ||
tokenizers==0.15.2 | ||
posthog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Constants for VLite application | ||
class Constants: | ||
# Device options | ||
DEVICE_CPU = 'cpu' | ||
DEVICE_CUDA = 'cuda' | ||
DEVICE_MPS = 'mps' | ||
|
||
# Model details | ||
DEFAULT_MODEL = 'mixedbread-ai/mxbai-embed-large-v1' | ||
|
||
# Metadata keys | ||
METADATA_TEXT = 'text' | ||
METADATA_BINARY_VECTOR = 'binary_vector' | ||
METADATA_METADATA = 'metadata' | ||
|
||
# Precision types | ||
PRECISION_BINARY = 'binary' | ||
|
||
# Logging | ||
LOG_INIT = "[VLite.__init__] Initializing VLite with device: {}" | ||
LOG_EXEC_TIME = "[VLite.{}] Execution time: {:.5f} seconds" | ||
LOG_NO_COLLECTION = "[VLite.__init__] Collection file {} not found. Initializing empty attributes." | ||
LOG_RETRIEVING = "[VLite.retrieve] Retrieving similar texts..." | ||
LOG_RETRIEVING_QUERY = "[VLite.retrieve] Retrieving top {} similar texts for query: {}" | ||
LOG_RETRIEVAL_COMPLETED = "[VLite.retrieve] Retrieval completed." | ||
LOG_RANK_FILTER = "[VLite.rank_and_filter] Shape of query vector: {}" | ||
LOG_RANK_FILTER_RESHAPE = "[VLite.rank_and_filter] Shape of query vector after reshaping: {}" | ||
LOG_RANK_FILTER_CORPUS_SHAPE = "[VLite.rank_and_filter] Shape of corpus binary vectors array: {}" | ||
LOG_RANK_FILTER_TOP_K = "[VLite.rank_and_filter] Top {} indices: {}" | ||
LOG_RANK_FILTER_TOP_K_SCORES = "[VLite.rank_and_filter] Top {} scores: {}" | ||
LOG_RANK_FILTER_COLLECTION_COUNT = "[VLite.rank_and_filter] No. of items in the collection: {}" | ||
LOG_RANK_FILTER_VLITE_COUNT = "[VLite.rank_and_filter] Vlite count: {}" | ||
LOG_ADD_ENCODING = "[VLite.add] Encoding text... not chunking" | ||
|
||
TELEMETRY_POSTHOG = 'phc_i9Aq4aTt4aFpFqyKzxN9LGq3SfoIjYNAcazDnn6dSLP' | ||
TELEMETRY_POSTHOG_HOST = 'https://us.i.posthog.com' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters