Continue AI features and improve protocol support
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import asyncio
|
||||
import random
|
||||
|
||||
|
||||
async def natural_send_message(
|
||||
@@ -11,7 +10,8 @@ async def natural_send_message(
|
||||
Args:
|
||||
chat_session: The active chat session.
|
||||
ts: Timestamp of the message.
|
||||
c: The context or object with `.send()`, `.start_typing()`, and `.stop_typing()` methods.
|
||||
c: The context or object with `.send()`, `.start_typing()`,
|
||||
and `.stop_typing()` methods.
|
||||
text: A string containing multiple messages separated by double newlines (`\n\n`).
|
||||
|
||||
Behavior:
|
||||
@@ -34,7 +34,7 @@ async def natural_send_message(
|
||||
length_factor = len(message) / 25
|
||||
# ~50 chars ≈ +1s processing
|
||||
# ~25 chars ≈ +1s processing
|
||||
natural_delay = min(base_delay + length_factor, 10) # Cap at 5s max
|
||||
natural_delay = min(base_delay + length_factor, 10) # Cap at 10s max
|
||||
|
||||
# Decide when to start thinking *before* typing
|
||||
if not skip_thinking:
|
||||
|
||||
Reference in New Issue
Block a user