Update app.py
Browse files
app.py
CHANGED
@@ -134,9 +134,11 @@ def chat_completions():
|
|
134 |
logging.info(_cookie[:50])
|
135 |
headers = {"Content-Type": "application/json", "Cookie": _cookie}
|
136 |
# 默认 stream 模式开启,但针对 AkashGen 模型关闭流式响应
|
137 |
-
stream_flag = data.get('stream',
|
138 |
if model == "AkashGen":
|
139 |
stream_flag = False
|
|
|
|
|
140 |
|
141 |
akash_response = requests.post(
|
142 |
'https://chat.akash.network/api/chat',
|
|
|
134 |
logging.info(_cookie[:50])
|
135 |
headers = {"Content-Type": "application/json", "Cookie": _cookie}
|
136 |
# 默认 stream 模式开启,但针对 AkashGen 模型关闭流式响应
|
137 |
+
stream_flag = data.get('stream', 'true')
|
138 |
if model == "AkashGen":
|
139 |
stream_flag = False
|
140 |
+
else:
|
141 |
+
stream_flag = json.loads(stream_flag)
|
142 |
|
143 |
akash_response = requests.post(
|
144 |
'https://chat.akash.network/api/chat',
|