-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix: use fusejs to filter search results for slack channels and users #418
Conversation
const publicChannels = publicResult.channels.filter(channel => channel.name.includes(query)) | ||
const privateChannels = privateResult.channels.filter(channel => channel.name.includes(query)) | ||
const result = await webClient.conversations.list({limit: 100, types: 'public_channel,private_channel'}) | ||
const channels = (new Fuse( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can improve the results for searchUsers
as with this as well. maybe its worth doing it in this PR as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure I think that makes sense to do here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Update the `Search Channels` tool to use Fuse.js to filter slack channel names by similarity to the query string. Note: This may not return exact matches, but will allow LLMs to filter the channels down to results with similar names. Addresses obot-platform/obot#1660 Signed-off-by: Nick Hale <[email protected]>
2a16d77
to
76dd764
Compare
Signed-off-by: Nick Hale <[email protected]>
76dd764
to
e562f73
Compare
Update the
Search Channels
andSearch Users
tools to use Fuse.js to filter slack channel names and user names by similarity to the query string.Note: This may not return exact matches, but will allow LLMs to filter the channels and users down to results with similar names.
Addresses obot-platform/obot#1660