Conversation
| cutoff = message_time + timedelta(minutes=CONFIG.SUMMARISE_COOLDOWN) | ||
| # check that message time + cooldown time period is still in the future | ||
| if now < cutoff: | ||
| await ctx.reply("STFU!! Wait " + str(int((cutoff - now).total_seconds())) + " Seconds. You are on Cool Down." ) |
| else: | ||
| self.cooldowns[ctx.channel.id] = [now, 1] # reset the cooldown | ||
| else: | ||
| self.cooldowns[ctx.channel.id][1]+=1 |
Contributor
There was a problem hiding this comment.
Did ruff not pick up on spaces either side of the +=?
| self.LIEGE_CHANCELLOR_ID: int = parsed.get("liege_chancellor_id") | ||
| self.SUMMARISE_LIMIT: int = parsed.get("summarise_limit") | ||
| self.SUMMARISE_COOLDOWN: int = parsed.get("summarise_cooldown") | ||
| self.SUMMARISE_MESSAGE_LIMIT: int = parsed.get("summarise_message_limit") |
Contributor
There was a problem hiding this comment.
Remember when you deploy this to add this to the config file on beryillum
| def build_prompt(self, bullet_points, channel_name, response_size): | ||
|
|
||
| bullet_points = "Put it in bullet points for readability." if bullet_points else "" | ||
| prompt = f"""People yap too much, I don't want to read all of it. The topic is related to {channel_name}. In {response_size} words or less give me the gist of what is being said. {bullet_points} Note that the messages are in reverse chronological order: |
Contributor
There was a problem hiding this comment.
Can you add this to the config file too, so we can experiment slightly
I reckon this could do with a bit of prompt tuning, I don't really know what I'm talking about, but maybe something like this one. At least something to make it waffle less and be more precise
| if CONFIG.AI_INCLUDE_NAMES and msg.author != self.bot.user: | ||
| initial += msg.author.name + ":" + msg.content + "\n" | ||
|
|
||
| message_length += len(msg.content.split()) |
Contributor
There was a problem hiding this comment.
Did you want to add the thing to only go back as far as the last tldr (perhaps with an option to override)
What exactly is the point of message_length?
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.
No description provided.