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

Aim Security post-call guardrails support #8356

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

Conversation

hxtomer
Copy link
Contributor

@hxtomer hxtomer commented Feb 7, 2025

Title

This PR adds support for post-call Aim Security guardrails. Aim guards can analyze LLM output in streaming mode using websockets, in order to ensure a smooth user experience while securing the streamed content with increasing context rather than processing it chunk by chunk.

Type

🆕 New Feature

Changes

I've added a new CustomGuardrail hook that allows Guardrails to consume the response stream as an iterator instead of chunk by chunk. An example usage is in aim.py.

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

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

image
Tested on python 3.9 - 3.12 (3.8 seems to have some dependency issues at the moment).

Thanks in advance for your review :)

Tomer

Copy link

vercel bot commented Feb 7, 2025

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 7, 2025 0:37am

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