Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control running lakera prompt checks - pre api call OR in parallel #4832

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

krrishdholakia
Copy link
Contributor

Title

Control running lakera prompt checks - pre api call OR in parallel

litellm_settings:
  guardrails:
    - prompt_injection:  # your custom name for guardrail
        callbacks: [lakera_prompt_injection] # litellm callbacks to use
        default_on: true
        callback_args: {"lakera_prompt_injection": {"moderation_check": "pre_call"}} 

Relevant issues

Fixes issue where user couldn't control how lakera calls were running

Type

🆕 New Feature

Changes

  • adds check in lakera_ai.py for pre_call or in_parallel
  • adds support for passing callback-specific args in guardrail config

[REQUIRED] Testing - Attach a screenshot of any new tests passing locall

If UI changes, send a screenshot/GIF of working UI fixes

  • new test added to test_lakerai_prompt_injection.py

Copy link

vercel bot commented Jul 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 6, 2024 9:49pm

litellm/tests/test_text_completion.py Dismissed Show dismissed Hide dismissed
litellm/tests/test_completion.py Dismissed Show dismissed Hide dismissed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant