Skip to content

Commit

Permalink
Summarize the messages by organizing them in the correct order
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Oct 10, 2024
1 parent 45e4c60 commit 9d9fa7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion listeners/events/user_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def respond_to_user_message(
raise e

prompt = f"Can you generate a brief summary of these messages in a Slack channel <#{referred_channel_id}>?\n\n"
for message in channel_history.get("messages"):
for message in reversed(channel_history.get("messages")):
if message.get("user") is not None:
prompt += f"\n<@{message['user']}> says: {message['text']}\n"
messages_in_thread = [{"role": "user", "content": prompt}]
Expand Down

0 comments on commit 9d9fa7e

Please sign in to comment.