DeepLearning101 commited on
Commit
e0f965a
·
verified ·
1 Parent(s): 766fe34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -32,7 +32,8 @@ async def send_chat_message(LLM_URL, LLM_API, user_input):
32
  return f"Error: {response.status}"
33
 
34
  full_response = []
35
- async for line in response.content:
 
36
  line = line.decode('utf-8').strip()
37
  if not line:
38
  continue
 
32
  return f"Error: {response.status}"
33
 
34
  full_response = []
35
+
36
+ async for line in response.content.iter_chunked(1024): # 設置分段大小為 1024 bytes
37
  line = line.decode('utf-8').strip()
38
  if not line:
39
  continue