Sign inSign up

laiyer/llm-guard-api

By laiyer

•Updated over 1 year ago

A simple fastapi-based API to run LLM Guard checks.

Image
4

50K+

laiyer/llm-guard-api repository overview

⁠LLM Guard API

A simple fastapi-based API to run LLM Guard checks.

Read more⁠

⁠What is LLM Guard?

LLM-Guard is a comprehensive tool designed to fortify the security of Large Language Models (LLMs).

Documentation⁠ | LLM Guard Playground⁠

⁠Installation

We have an officially supported image on Docker Hub⁠.

⁠Download Docker image
docker pull laiyer/llm-guard-api
⁠Run container with default port
docker run -d -p 8001:8000 -e DEBUG='false' laiyer/llm-guard-api:latest

⁠Configuration

⁠Environment variables
  • DEBUG (bool): Enable debug mode
  • CACHE_MAX_SIZE (int): Maximum number of items in the cache. Default is unlimited.
  • CACHE_TTL (int): Time in seconds after which a cached item expires. Default is 1 hour.
  • SCAN_FAIL_FAST (bool): Stop scanning after the first failed check. Default is False.

We recommend to enable SCAN_FAIL_FAST to avoid unnecessary scans.

⁠Scanners

You can configure scanners in scanners.yml referring to their names and parameters.

Scanners will be executed in the order of configuration.

Tag summary

Content type

Image

Digest

sha256:bea3efb12…

Size

3.3 GB

Last updated

over 1 year ago

docker pull laiyer/llm-guard-api