deadbits / vigil-llm

⚡ Vigil ⚡ Detect prompt injections, jailbreaks, and other potentially risky Large Language Model (LLM) inputs
https://vigil.deadbits.ai/
Apache License 2.0
304 stars 35 forks source link

Keyword arguments #61

Closed deadbits closed 10 months ago

deadbits commented 10 months ago

Right now the scanners and vector database are initialized by passing their configurations as dictionaries then reading the required keys. This should be changed to use keyword arguments everywhere.. no real need to pass a dict around, its messy. If the config keys match the kwargs, we can just do **configdict to do it a little more dynamically.

deadbits commented 10 months ago

Addressed with https://github.com/deadbits/vigil-llm/pull/63

All scanners are now initialized with keyword arguments instead of passing a dictionary of arguments. If a scanner uses the require_config=True option, Vigil will look for a section in the config file named scanner:$name and pass that sections options as keyword arguments to the scanner.