nanoppa commited on
Commit
27e0439
·
verified ·
1 Parent(s): 6a33c8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -134,8 +134,12 @@ def chat_completions():
134
  logging.info(_cookie[:50])
135
  headers = {"Content-Type": "application/json", "Cookie": _cookie}
136
  # 默认 stream 模式开启,但针对 AkashGen 模型关闭流式响应
137
- stream_flag = model != "AkashGen" and data.get("stream", "true").lower() == "true"
138
-
 
 
 
 
139
  akash_response = requests.post(
140
  'https://chat.akash.network/api/chat',
141
  json=akash_data,
 
134
  logging.info(_cookie[:50])
135
  headers = {"Content-Type": "application/json", "Cookie": _cookie}
136
  # 默认 stream 模式开启,但针对 AkashGen 模型关闭流式响应
137
+ stream_flag = True
138
+ if model == "AkashGen":
139
+ stream_flag = False
140
+ else:
141
+ stream_flag = data.get('stream',False)
142
+ logging.info("streamflag: %s", stream_flag)
143
  akash_response = requests.post(
144
  'https://chat.akash.network/api/chat',
145
  json=akash_data,