Should we redact Tool content #8
Closed
stevepolitodesign
started this conversation in
General
Replies: 1 comment
|
I can confirmed the following works:
class ProfileLookup < RubyLLM::Tool
description "Looks up a user profile by email and returns their account details"
param :email, desc: "The user's email address"
def execute(email:)
{
email: email,
plan: "Premium",
member_since: "2021-03-15"
}
end
end
# Should not filter
puts "\n--- Tool call without filtering ---"
chat = RubyLLM.chat.with_tool(ProfileLookup)
response = chat.ask "Look up the profile for user@example.com"
puts response.content
# Should filter
puts "\n--- Tool call with filtering ---"
RubyLLM::TopSecret.with_filtering do
chat = RubyLLM.chat.with_tool(ProfileLookup)
response = chat.ask "Look up the profile for user@example.com"
puts response.content
end |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
RubyLLM offers an API for Tools. At the moment, I think the current implementation would redact content when those are called, but I need to investigate. If this is the case, does this make sense?
All reactions