-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Enhance SlackReader to fetch Channel IDs from Channel Names/Patterns #14429
Merged
logan-markewich
merged 7 commits into
run-llama:main
from
chetanchoudhary:slack-reader-enhancement
Jul 2, 2024
Merged
Enhance SlackReader to fetch Channel IDs from Channel Names/Patterns #14429
logan-markewich
merged 7 commits into
run-llama:main
from
chetanchoudhary:slack-reader-enhancement
Jul 2, 2024
Conversation
This file contains 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
- Added support for channel name patterns (exact names and regex) in SlackReader. - Updated load_data method to handle both channel IDs and name patterns, combining results.
- Added support for channel name patterns (exact names and regex) in SlackReader. - get_channel_ids method to get channel ids from given channel names or regex patterns.
dosubot
bot
added
the
size:M
This PR changes 30-99 lines, ignoring generated files.
label
Jun 27, 2024
- Improved error handling - Added CHANGELOG - Updated version
- Update SlackDemo Notebook for example using get_channel_ids
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
dosubot
bot
added
size:L
This PR changes 100-499 lines, ignoring generated files.
and removed
size:M
This PR changes 30-99 lines, ignoring generated files.
labels
Jun 28, 2024
- Handle `not_in_channel` error by logging and exiting the loop to prevent indefinite retries. - Implement a default retry interval for rate limiting, ensuring controlled retries. - Enhances overall error handling and robustness.
fersilva16
approved these changes
Jun 29, 2024
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.
lgtm
@logan-markewich , please help with the review on this PR. |
logan-markewich
approved these changes
Jul 2, 2024
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.
Summary
This PR enhances the
SlackReader
class to support filtering Slack channels based on channel name patterns, including exact names and regular expressions. This update makes it easier to specify and retrieve conversations from channels by adding method to get channel IDs using channel names or regex pattern.Changes
Feature: Added support for extracting channel ids from channel name patterns (exact names and regex) in
SlackReader
.Enhancement: Added the
get_channel_ids
method to fetch channel ids from name patterns, these ids can be further used inload_data
same as before.Bug fixes
not_in_channel
error or any other error exceptratelimited
is returned by Slack, The code went into infinite loop of indefinite retries. Improved handling of the not_in_channel error. The reader now logs this error and breaks the loop, preventing indefinite retries.Motivation
The existing implementation required channel IDs to retrieve conversations, which could be cumbersome for users who may not have direct access to these IDs. By allowing the use of channel name patterns, this update simplifies the process of specifying channels, especially when dealing with multiple or dynamically named channels.
Testing
load_data
method with various combinations of channel IDs and name patterns to confirm correct functionality.Please review the changes and provide feedback. Thank you!