seth/llmguard - #60335
Draft
snickell wants to merge 17 commits into
Draft
Conversation
snickell
commented
Aug 11, 2024
|
|
||
| def perform(prompt:) | ||
| results = Python.run do | ||
| pyimport "pycdo.aichat.safety", as: :safety |
Contributor
Author
There was a problem hiding this comment.
Currently this will CRASH HERE. LLMGuard plays pretty rough. This PR is blocking on me fixing this underlying code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preview: NOT READY WILL CRASH
This is a broken+will-crash demo of how to integrate the LLMGuard pip with ActiveJob and
Python.run(&block). Continuation of #60221.I'm using this as a concrete example to shape the new Python.run API developed in
seth/pretty-in-py#60300Pathes to Release
Its quite possible this PR will be merged exactly as-is. The blocker is crashes in the two approaches to fulfilling the fantasy API this PR uses: Python.run(). Here's where it will currently crash.
Path 1: use the Python.run() API shim.
delayed_job, indications are the fix is a major Ruby version upgrade, seth/ruby-3.3: Upgrade to Ruby 3.3.4 #60329Path 2: skip the API shim and move straight to the real thing.