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

feat(proxy_server.py): add support for blocked user lists (enterprise-only) #2144

Merged
merged 2 commits into from Feb 23, 2024

Conversation

krrishdholakia
Copy link
Contributor

@krrishdholakia krrishdholakia commented Feb 23, 2024

Addresses - #2136

Enable Blocked User Lists

If any call is made to proxy with this user id, it'll be rejected - use this if you want to let users opt-out of ai features

litellm_settings: 
     callbacks: ["blocked_user_check"] 
     blocked_user_id_list: ["user_id_1", "user_id_2", ...]  # can also be a .txt filepath e.g. `/relative/path/blocked_list.txt` 

How to test

curl --location 'http://0.0.0.0:8000/chat/completions' \
--header 'Content-Type: application/json' \
--data ' {
      "model": "gpt-3.5-turbo",
      "messages": [
        {
          "role": "user",
          "content": "what llm are you"
        }
      ],
      "user_id": "user_id_1" # this is also an openai supported param 
    }
'

Copy link

railway-app bot commented Feb 23, 2024

This PR was not deployed automatically as @krrishdholakia does not have access to the Railway project.

In order to get automatic PR deploys, please add @krrishdholakia to your team on Railway.

1 similar comment
Copy link

railway-app bot commented Feb 23, 2024

This PR was not deployed automatically as @krrishdholakia does not have access to the Railway project.

In order to get automatic PR deploys, please add @krrishdholakia to your team on Railway.

Copy link

vercel bot commented Feb 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 Feb 23, 2024 2:06am
litellm-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 23, 2024 2:06am

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.

None yet

1 participant