实现了完整的Flock渠道接入能力,包含消息收发、Webhook事件监听、账号配置、安全校验、媒体文件处理等功能,支持私聊和群组聊天,适配ForcePilot插件规范。
29 lines
949 B
Python
29 lines
949 B
Python
from __future__ import annotations
|
|
|
|
STREAMING_MODE = "block"
|
|
|
|
BLOCK_STREAMING_ENABLED = True
|
|
BLOCK_STREAMING_BREAK = "sentence"
|
|
BLOCK_STREAMING_CHUNK_MIN_CHARS = 500
|
|
BLOCK_STREAMING_CHUNK_MAX_CHARS = 7000
|
|
BLOCK_STREAMING_CHUNK_BREAK_PREFERENCE = "sentence"
|
|
PREVIEW_STREAM_THROTTLE_MS = 800
|
|
PREVIEW_MIN_INITIAL_CHARS = 200
|
|
|
|
streaming_mode = STREAMING_MODE
|
|
block_streaming_enabled = BLOCK_STREAMING_ENABLED
|
|
block_streaming_break = BLOCK_STREAMING_BREAK
|
|
block_streaming_chunk_min_chars = BLOCK_STREAMING_CHUNK_MIN_CHARS
|
|
block_streaming_chunk_max_chars = BLOCK_STREAMING_CHUNK_MAX_CHARS
|
|
block_streaming_chunk_break_preference = BLOCK_STREAMING_CHUNK_BREAK_PREFERENCE
|
|
preview_stream_throttle_ms = PREVIEW_STREAM_THROTTLE_MS
|
|
preview_min_initial_chars = PREVIEW_MIN_INITIAL_CHARS
|
|
|
|
|
|
def create_block_chunker() -> object:
|
|
return None
|
|
|
|
|
|
def create_draft_stream_session(target_id: str, config: dict, account_id: str = "default") -> object:
|
|
return None
|