-
Notifications
You must be signed in to change notification settings - Fork 76
Getting access to raw response object in a Guardrail? #32
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
Comments
Hey @Manouchehri not today but I think it's a good feature request! We will have to see how to best do it since the chat completions response gets converted into a different format before it reaches any guardrail execution so it's not as easy as exposing it. |
Hmm, is it possible to do with a hook and add the raw response to the context? (I tried and failed to add that.) |
I think what we should do is move all the optional fields into providerData properties on the messages and then expose the full ModelResponse to the output guardrail as a separate field |
This issue is stale because it has been open for 7 days with no activity. |
Not stale. :P |
This should get fixed in the 0.0.8 release today. Change was done in #104. There is now an additional |
Inside a Guardrail, is there a way I can access the raw response object? e.g. I am trying to read
prompt_filter_results
in my Guardrail. Example response object:The text was updated successfully, but these errors were encountered: