Spaces:
Runtime error
Runtime error
| # Embedding model name from HuggingFace | |
| EMBEDDING_MODEL_NAME = "sentence-transformers/all-mpnet-base-v2" | |
| # Embedding model kwargs | |
| MODEL_KWARGS = {"device": "cpu"} # or "cuda" | |
| # The similarity threshold in % | |
| # where 1.0 is 100% "known threat" from the database. | |
| # Any vectors found above this value will teigger an anomaly on the provided prompt. | |
| SIMILARITY_ANOMALY_THRESHOLD = 0.1 | |
| # Number of prompts to retreive (TOP K) | |
| K = 3 | |
| # Number of similar prompts to revreive before choosing TOP K | |
| FETCH_K = 5 | |
| # The path of the dataset (to ingest) | |
| DATASET_DIR = "/code/data/datasets/" | |
| # DATASET_DIR = "../data/datasets/" | |
| # DATASET_DIR = "/code/data/datasets/malicious_prompts/" | |
| # DATASET_DIR = "../data/datasets/malicious_prompts/" | |
| # DATASET_DIR = "/code/data/datasets/new_prompts_08_2024" | |
| # The path of the vector store | |
| # VECTORSTORE_FILENAME = "vectorstores/all" | |
| # VECTORSTORE_FILENAME = "vectorstores/jailbreak_v_28k" | |
| # VECTORSTORE_FILENAME = "vectorstores/malicious_prompts" | |
| # VECTORSTORE_FILENAME = "vectorstores/malicious_prompts_chumk_200_overlap_100" | |
| # VECTORSTORE_FILENAME = "vectorstores/malicious_prompts_chumk_200_overlap_100_2" | |
| # VECTORSTORE_FILENAME = ( | |
| # "/code/data/vectorstores/malicious_prompts_knowledge_base" | |
| # ) | |
| # VECTORSTORE_FILENAME = "../data/vectorstores/all_prompts" | |
| # VECTORSTORE_FILENAME = "../data/vectorstores/best" | |
| # VECTORSTORE_FILENAME = "/code/data/vectorstores/pliny-the-prompter-prompts" | |
| VECTORSTORE_FILENAME = "/code/vectorstore" | |
| # VECTORSTORE_FILENAME = "../data/vectorstores/09-2024" | |
| # VECTORSTORE_FILENAME = "/code/data/vectorstores/best" | |