Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deadbits/vigil-llm
/ functions
Functions
77 in github.com/deadbits/vigil-llm
⨍
Functions
77
◇
Types & classes
28
↳
Endpoints
6
↓ 17 callers
Method
get
(self, key: str)
vigil/core/cache.py:9
↓ 10 callers
Function
check_field
(data, field_name: str, field_type: type, required: bool = True)
vigil-server.py:21
↓ 5 callers
Method
add
Add canary token to prompt
vigil/core/canary.py:32
↓ 4 callers
Method
get_general_config
(self)
vigil/core/config.py:42
↓ 4 callers
Method
perform_scan
(self, prompt: str, prompt_response: str = None)
vigil/dispatch.py:48
↓ 4 callers
Function
timestamp_str
()
vigil/common.py:9
↓ 3 callers
Method
generate
Call configured LLM model with litellm
vigil/core/llm.py:30
↓ 2 callers
Method
_create_manager
(self, name: str, scanners: List[BaseScanner])
vigil/vigil.py:88
↓ 2 callers
Method
_setup_scanners
(self, scanner_names: List[str])
vigil/vigil.py:55
↓ 2 callers
Method
add_texts
(self, texts: List[str], metadatas: List[dict])
vigil/core/vectordb.py:61
↓ 2 callers
Method
check
Check if prompt contains a canary token
vigil/core/canary.py:47
↓ 2 callers
Method
from_config
(config_path: str)
vigil/vigil.py:102
↓ 2 callers
Method
get_scanner_names
(self, scanner_type: str)
vigil/core/config.py:45
↓ 2 callers
Method
get_val
(self, section: str, key: str)
vigil/core/config.py:22
↓ 2 callers
Method
process_chunk
(self, chunk)
vigil/core/loader.py:43
↓ 2 callers
Method
run
(self, prompt: str, scan_id: uuid.uuid4, prompt_response: str = None)
vigil/dispatch.py:114
↓ 2 callers
Function
uuid4_str
()
vigil/common.py:5
↓ 1 callers
Method
_initialize_embedder
(self)
vigil/vigil.py:44
↓ 1 callers
Method
_initialize_vectordb
(self)
vigil/vigil.py:49
↓ 1 callers
Method
add_embeddings
(self, texts: List[str], embeddings: List[List], metadatas: List[dict])
vigil/core/vectordb.py:79
↓ 1 callers
Method
analyze
(self, scan_obj: ScanModel, scan_id: UUID = uuid4())
vigil/schema.py:45
↓ 1 callers
Function
calculate_entropy
(text)
vigil/dispatch.py:23
↓ 1 callers
Function
cosine_similarity
Get cosine similarity between two embeddings
vigil/core/embedding.py:11
↓ 1 callers
Method
create_scanner
( cls, name: str, config: Optional[dict] = None, vectordb: Optional[Callable]
vigil/registry.py:39
↓ 1 callers
Method
generate
Generate a canary token with optional prefix
vigil/core/canary.py:18
↓ 1 callers
Method
get_or_create_collection
(self, name: str)
vigil/core/vectordb.py:52
↓ 1 callers
Method
get_scanner_config
(self, scanner_name)
vigil/core/config.py:39
↓ 1 callers
Method
get_scanner_metadata
(cls, name: str)
vigil/registry.py:86
↓ 1 callers
Method
is_yara_file
Check if file is rule by extension
vigil/scanners/yara.py:51
↓ 1 callers
Method
load_dataset
(self, dataset_name: str)
vigil/core/loader.py:13
↓ 1 callers
Method
load_prompt
(self)
vigil/scanners/relevance.py:28
↓ 1 callers
Method
load_rules
Compile all YARA rules in a directory and store in memory
vigil/scanners/yara.py:32
↓ 1 callers
Method
post_init
Optional post-initialization method
vigil/schema.py:48
↓ 1 callers
Method
query
(self, text: str)
vigil/core/vectordb.py:98
↓ 1 callers
Method
register_scanner
( cls, name: str, scanner_class: Type[BaseScanner], requires_config=False,
vigil/registry.py:21
↓ 1 callers
Method
set
(self, key: str, value: any)
vigil/core/cache.py:16
↓ 1 callers
Function
setup_vectordb
(conf: Config)
loader.py:13
↓ 1 callers
Function
test_canary_tokens
()
scripts/tests.py:17
↓ 1 callers
Function
test_input_scanner
()
scripts/tests.py:9
↓ 1 callers
Function
test_output_scanner
()
scripts/tests.py:12
Method
__init__
(self, name: str = '')
vigil/schema.py:41
Method
__init__
(self, scanners: List[BaseScanner], auto_update: bool = False,
vigil/dispatch.py:30
Method
__init__
(self, scanners: List[BaseScanner])
vigil/dispatch.py:110
Method
__init__
(self, config_path: str)
vigil/vigil.py:22
Method
__init__
(self, config_file: str)
vigil/core/config.py:12
Method
__init__
(self, model_name: str, api_key: Optional[str] = None, api_base: Optional[str] = None)
vigil/core/llm.py:14
Method
__init__
(self, vector_db, chunk_size=100)
vigil/core/loader.py:9
Method
__init__
(self, capacity: int)
vigil/core/cache.py:5
Method
__init__
(self)
vigil/core/canary.py:15
Method
__init__
(self, model: str, openai_key: str = None)
vigil/core/embedding.py:19
Method
__init__
Initialize Chroma vector db client
vigil/core/vectordb.py:15
Method
__init__
(self, rules_dir: str)
vigil/scanners/yara.py:16
Method
__init__
(self, threshold: float, embedder: Callable)
vigil/scanners/similarity.py:19
Method
__init__
(self, model: str, threshold: float)
vigil/scanners/transformer.py:16
Method
__init__
(self, config_dict: dict)
vigil/scanners/relevance.py:14
Method
__init__
(self, threshold: float)
vigil/scanners/sentiment.py:20
Method
__init__
(self, db_client: VectorDB, threshold: float)
vigil/scanners/vectordb.py:14
Method
_openai
(self, input_data: str)
vigil/core/embedding.py:55
Method
_transformer
(self, input_data: str)
vigil/core/embedding.py:66
Function
add_canary
Add a canary token to the prompt
vigil-server.py:50
Function
add_texts
Add text to the vector database (embedded at index)
vigil-server.py:102
Method
analyze
Run scan against input data and return list of YaraMatchs
vigil/scanners/yara.py:57
Method
analyze
(self, scan_obj: ScanModel, scan_id: uuid.uuid4)
vigil/scanners/similarity.py:26
Method
analyze
(self, scan_obj: ScanModel, scan_id: uuid.uuid4)
vigil/scanners/transformer.py:28
Method
analyze
(self, input_data: str, scan_id: uuid.uuid4)
vigil/scanners/relevance.py:35
Method
analyze
(self, scan_obj: ScanModel, scan_id: uuid.uuid4)
vigil/scanners/sentiment.py:26
Method
analyze
(self, scan_obj: ScanModel, scan_id: uuid.uuid4)
vigil/scanners/vectordb.py:20
Function
analyze_prompt
Analyze a prompt against a set of scanners
vigil-server.py:142
Function
analyze_response
Analyze a prompt and its response
vigil-server.py:125
Function
check_canary
Check if the prompt contains a canary token
vigil-server.py:77
Method
decorator
(scanner_class: Type[BaseScanner])
vigil/registry.py:11
Method
generate
(self, input_data: str)
vigil/core/embedding.py:51
Method
get_bool
(self, section: str, key: str, default: bool = False)
vigil/core/config.py:32
Method
get_scanner_cls
(cls)
vigil/registry.py:82
Method
get_scanner_names
(cls)
vigil/registry.py:78
Method
scanner
(name: str, requires_config=False, requires_vectordb=False, **additional_metadata)
vigil/registry.py:10
Function
show_settings
Return the current configuration settings
vigil-server.py:38