chore: Adjust StreamOptimizer parameters for improved performance

- Reduced long_text_threshold from 100 to 50 characters
- Decreased chunk_size from 10 to 5

These changes aim to optimize the streaming output for better user experience
and responsiveness, particularly for medium-length texts.
This commit is contained in:
snaily
2025-03-06 16:45:35 +08:00
parent 0871548b07
commit 40e5ffa5f4

View File

@@ -20,8 +20,8 @@ class StreamOptimizer:
min_delay: float = 0.016,
max_delay: float = 0.024,
short_text_threshold: int = 10,
long_text_threshold: int = 100,
chunk_size: int = 10):
long_text_threshold: int = 50,
chunk_size: int = 5):
"""初始化流式输出优化器
参数: