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
303 stars 35 forks source link

Decouple vector db from scanner #20

Closed deadbits closed 1 year ago

deadbits commented 1 year ago

Right now the vector db is only initialized if the vector db scanner is used. because of this I can't easily add an API endpoint that indexes new embeddings.

The DB should be de-coupled from the scanner. DB gets initialized with the main apps, and the scanner is either passed a client to use or still pass the collection name and start a 2nd client for the scanner. One client is probably better for memory usage.

deadbits commented 1 year ago

https://github.com/deadbits/vigil-llm/commit/6f15923bfb2678c9aaab3eb5331caa875abd3c87