mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-01 01:39:05 -05:00
enh: CHAT_RESPONSE_STREAM_DELTA_CHUNK_SIZE
This commit is contained in:
@@ -487,6 +487,25 @@ else:
|
||||
MODELS_CACHE_TTL = 1
|
||||
|
||||
|
||||
####################################
|
||||
# CHAT
|
||||
####################################
|
||||
|
||||
CHAT_RESPONSE_STREAM_DELTA_CHUNK_SIZE = os.environ.get(
|
||||
"CHAT_RESPONSE_STREAM_DELTA_CHUNK_SIZE", "1"
|
||||
)
|
||||
|
||||
if CHAT_RESPONSE_STREAM_DELTA_CHUNK_SIZE == "":
|
||||
CHAT_RESPONSE_STREAM_DELTA_CHUNK_SIZE = 1
|
||||
else:
|
||||
try:
|
||||
CHAT_RESPONSE_STREAM_DELTA_CHUNK_SIZE = int(
|
||||
CHAT_RESPONSE_STREAM_DELTA_CHUNK_SIZE
|
||||
)
|
||||
except Exception:
|
||||
CHAT_RESPONSE_STREAM_DELTA_CHUNK_SIZE = 1
|
||||
|
||||
|
||||
####################################
|
||||
# WEBSOCKET SUPPORT
|
||||
####################################
|
||||
|
||||
Reference in New Issue
Block a user