MCPcopy Create free account

hub / github.com/deadbits/vigil-llm / functions

Functions77 in github.com/deadbits/vigil-llm

↓ 17 callersMethodget
(self, key: str)
vigil/core/cache.py:9
↓ 10 callersFunctioncheck_field
(data, field_name: str, field_type: type, required: bool = True)
vigil-server.py:21
↓ 5 callersMethodadd
Add canary token to prompt
vigil/core/canary.py:32
↓ 4 callersMethodget_general_config
(self)
vigil/core/config.py:42
↓ 4 callersMethodperform_scan
(self, prompt: str, prompt_response: str = None)
vigil/dispatch.py:48
↓ 4 callersFunctiontimestamp_str
()
vigil/common.py:9
↓ 3 callersMethodgenerate
Call configured LLM model with litellm
vigil/core/llm.py:30
↓ 2 callersMethod_create_manager
(self, name: str, scanners: List[BaseScanner])
vigil/vigil.py:88
↓ 2 callersMethod_setup_scanners
(self, scanner_names: List[str])
vigil/vigil.py:55
↓ 2 callersMethodadd_texts
(self, texts: List[str], metadatas: List[dict])
vigil/core/vectordb.py:61
↓ 2 callersMethodcheck
Check if prompt contains a canary token
vigil/core/canary.py:47
↓ 2 callersMethodfrom_config
(config_path: str)
vigil/vigil.py:102
↓ 2 callersMethodget_scanner_names
(self, scanner_type: str)
vigil/core/config.py:45
↓ 2 callersMethodget_val
(self, section: str, key: str)
vigil/core/config.py:22
↓ 2 callersMethodprocess_chunk
(self, chunk)
vigil/core/loader.py:43
↓ 2 callersMethodrun
(self, prompt: str, scan_id: uuid.uuid4, prompt_response: str = None)
vigil/dispatch.py:114
↓ 2 callersFunctionuuid4_str
()
vigil/common.py:5
↓ 1 callersMethod_initialize_embedder
(self)
vigil/vigil.py:44
↓ 1 callersMethod_initialize_vectordb
(self)
vigil/vigil.py:49
↓ 1 callersMethodadd_embeddings
(self, texts: List[str], embeddings: List[List], metadatas: List[dict])
vigil/core/vectordb.py:79
↓ 1 callersMethodanalyze
(self, scan_obj: ScanModel, scan_id: UUID = uuid4())
vigil/schema.py:45
↓ 1 callersFunctioncalculate_entropy
(text)
vigil/dispatch.py:23
↓ 1 callersFunctioncosine_similarity
Get cosine similarity between two embeddings
vigil/core/embedding.py:11
↓ 1 callersMethodcreate_scanner
( cls, name: str, config: Optional[dict] = None, vectordb: Optional[Callable]
vigil/registry.py:39
↓ 1 callersMethodgenerate
Generate a canary token with optional prefix
vigil/core/canary.py:18
↓ 1 callersMethodget_or_create_collection
(self, name: str)
vigil/core/vectordb.py:52
↓ 1 callersMethodget_scanner_config
(self, scanner_name)
vigil/core/config.py:39
↓ 1 callersMethodget_scanner_metadata
(cls, name: str)
vigil/registry.py:86
↓ 1 callersMethodis_yara_file
Check if file is rule by extension
vigil/scanners/yara.py:51
↓ 1 callersMethodload_dataset
(self, dataset_name: str)
vigil/core/loader.py:13
↓ 1 callersMethodload_prompt
(self)
vigil/scanners/relevance.py:28
↓ 1 callersMethodload_rules
Compile all YARA rules in a directory and store in memory
vigil/scanners/yara.py:32
↓ 1 callersMethodpost_init
Optional post-initialization method
vigil/schema.py:48
↓ 1 callersMethodquery
(self, text: str)
vigil/core/vectordb.py:98
↓ 1 callersMethodregister_scanner
( cls, name: str, scanner_class: Type[BaseScanner], requires_config=False,
vigil/registry.py:21
↓ 1 callersMethodset
(self, key: str, value: any)
vigil/core/cache.py:16
↓ 1 callersFunctionsetup_vectordb
(conf: Config)
loader.py:13
↓ 1 callersFunctiontest_canary_tokens
()
scripts/tests.py:17
↓ 1 callersFunctiontest_input_scanner
()
scripts/tests.py:9
↓ 1 callersFunctiontest_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
Functionadd_canary
Add a canary token to the prompt
vigil-server.py:50
Functionadd_texts
Add text to the vector database (embedded at index)
vigil-server.py:102
Methodanalyze
Run scan against input data and return list of YaraMatchs
vigil/scanners/yara.py:57
Methodanalyze
(self, scan_obj: ScanModel, scan_id: uuid.uuid4)
vigil/scanners/similarity.py:26
Methodanalyze
(self, scan_obj: ScanModel, scan_id: uuid.uuid4)
vigil/scanners/transformer.py:28
Methodanalyze
(self, input_data: str, scan_id: uuid.uuid4)
vigil/scanners/relevance.py:35
Methodanalyze
(self, scan_obj: ScanModel, scan_id: uuid.uuid4)
vigil/scanners/sentiment.py:26
Methodanalyze
(self, scan_obj: ScanModel, scan_id: uuid.uuid4)
vigil/scanners/vectordb.py:20
Functionanalyze_prompt
Analyze a prompt against a set of scanners
vigil-server.py:142
Functionanalyze_response
Analyze a prompt and its response
vigil-server.py:125
Functioncheck_canary
Check if the prompt contains a canary token
vigil-server.py:77
Methoddecorator
(scanner_class: Type[BaseScanner])
vigil/registry.py:11
Methodgenerate
(self, input_data: str)
vigil/core/embedding.py:51
Methodget_bool
(self, section: str, key: str, default: bool = False)
vigil/core/config.py:32
Methodget_scanner_cls
(cls)
vigil/registry.py:82
Methodget_scanner_names
(cls)
vigil/registry.py:78
Methodscanner
(name: str, requires_config=False, requires_vectordb=False, **additional_metadata)
vigil/registry.py:10
Functionshow_settings
Return the current configuration settings
vigil-server.py:38