Radosław Wolnik commited on
Commit
e6e430b
·
1 Parent(s): 389d8f0

Okay, I need to generate a one-line commit message based on the provided diffs. Let me look at the changes carefully.

The first part of the diff shows a function `on_message` being defined. The code is inside an async function. I notice that the code block is indented, which is correct in Python. The function is decorated with `@async def`, so that's good.

Looking at the lines, I see that the function definition is followed by some code. The changes include adding a new parameter `max_length=1900` to the `ai()` function call. So the main change is modifying the `max_length` parameter from 50 to 1900.

Now, I need to determine the type of this change. Since it's adding a new parameter to a function, the appropriate commit type would be "feat" for a feature addition, "fix" if it's a bug fix, "build" for a build change, etc. In this case, it's a new parameter, so it's likely a feature enhancement.

Next, I need to craft a concise one-line message. The message should start with the correct prefix, like "feat:", and describe the change. The change is increasing the max_length from 50 to 1900, which allows longer responses.

Putting it together, the commit message should be "feat: Increase ai response length from 50 to 1900". I need to make sure it's under 72 characters. Let me count: "feat: Increase ai response length from 50 to 1900" is 40 characters, which is well within the limit.

So the final commit message is "feat: Increase ai response length from 50 to 1900".
</think>

feat: Increase ai response length from 50 to 1900

Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -20,10 +20,6 @@ async def on_message(message):
20
  if message.channel != channel: return;
21
  if message.author.bot: return;
22
 
23
- # Per user
24
- x = guild.members
25
- if message.author.name=="sandra_n": await message.channel.send("I can see its you, sis");
26
-
27
  # Ensure tracking exists for this channel
28
  if message.channel.id not in message_counts:
29
  message_counts[message.channel.id] = 0
@@ -36,7 +32,7 @@ async def on_message(message):
36
  async for message in channel.history(limit=4):
37
  messages.append(message.content)
38
 
39
- response = ai("\n".join(messages), max_length=50, truncation=True, pad_token_id=50256)
40
 
41
  await channel.send(response[0]['generated_text'])
42
 
@@ -52,7 +48,7 @@ async def on_ready():
52
  guild = discord.utils.get(bot.guilds, name="PrzebieralniaKoedukacyjna")
53
  if guild:
54
  # Get the channel by name
55
- channel = discord.utils.get(guild.channels, name="ai_chatter") # Replace "general" with your channel name
56
  if channel:
57
  print(f"Channel found: {channel.name} (ID: {channel.id})")
58
  else:
 
20
  if message.channel != channel: return;
21
  if message.author.bot: return;
22
 
 
 
 
 
23
  # Ensure tracking exists for this channel
24
  if message.channel.id not in message_counts:
25
  message_counts[message.channel.id] = 0
 
32
  async for message in channel.history(limit=4):
33
  messages.append(message.content)
34
 
35
+ response = ai("\n".join(messages), max_length=1900, truncation=True, pad_token_id=50256)
36
 
37
  await channel.send(response[0]['generated_text'])
38
 
 
48
  guild = discord.utils.get(bot.guilds, name="PrzebieralniaKoedukacyjna")
49
  if guild:
50
  # Get the channel by name
51
+ channel = discord.utils.get(guild.channels, name="ai_chatter")
52
  if channel:
53
  print(f"Channel found: {channel.name} (ID: {channel.id})")
54
  else: