feat: give agent ability to read cross-posted Slack message links [closes OPE-37]#1200
Open
Aran Yogesh (aran-yogesh) wants to merge 5 commits intomainfrom
Open
feat: give agent ability to read cross-posted Slack message links [closes OPE-37]#1200Aran Yogesh (aran-yogesh) wants to merge 5 commits intomainfrom
Aran Yogesh (aran-yogesh) wants to merge 5 commits intomainfrom
Conversation
| all_context_text = " ".join(msg.get("text", "") for msg in context_messages) | ||
| slack_links = extract_slack_message_urls(all_context_text) | ||
| seen_urls: set[str] = set() | ||
| if slack_links: |
There was a problem hiding this comment.
all this logic should be abstracted out. dont want to include this much business logic within an already very large function
| f"## Conversation Context\n{context_text}\n\n" | ||
| f"## Latest Mention Request\n{clean_text}\n\n" | ||
| f"## Latest Mention Request\n{clean_text}" | ||
| f"{resolved_links_section}\n\n" |
There was a problem hiding this comment.
shouldn't actually include this section unless there's contents (there likely won't be most of the time)
| return message, author | ||
|
|
||
|
|
||
| def read_slack_message(url: str) -> dict[str, Any]: |
There was a problem hiding this comment.
this should be slack_read_thread_messages
and it should accept args for getting any message not just messages from urls:
- message_ts
- channel_ts
the agent will be smart enough to convert the url to this format, and then it can also be used in other instances to get messages in slack
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.
Summary
read_slack_messageagent tool to resolve cross-posted Slack messagelinks on demand
content upfront
Trace
https://dev.smith.langchain.com/public/0c688e43-4f82-4165-a126-c53b64a3493a/r