nhathuy07 commited on
Commit
808acd9
·
verified ·
1 Parent(s): 50217b3

Fix httpx timeout error

Browse files
Files changed (1) hide show
  1. main.py +6 -3
main.py CHANGED
@@ -198,7 +198,8 @@ async def __query_ml_predict(qtype: QType, content: str, header: str, token_limi
198
  "max_tokens": max(token_limit, 4096),
199
  "presence_penalty":0.3,
200
  "temperature":0.55
201
- }, timeout=None)
 
202
  )
203
 
204
  print(time() - stopwatch)
@@ -218,7 +219,8 @@ async def __query_ml_predict(qtype: QType, content: str, header: str, token_limi
218
  ],
219
  "max_tokens": max(token_limit, 4096),
220
 
221
- }, timeout=None)
 
222
  )
223
 
224
  _r_content = _r.json()['choices'][0]['message']['content'].split('\n\n',1)[1]
@@ -233,7 +235,8 @@ async def __query_ml_predict(qtype: QType, content: str, header: str, token_limi
233
  ],
234
  "max_tokens": max(token_limit, 4096),
235
 
236
- }, timeout=None)
 
237
  )
238
 
239
  _w_content = _w.json()['choices'][0]['message']['content'].split('\n\n',1)[1]
 
198
  "max_tokens": max(token_limit, 4096),
199
  "presence_penalty":0.3,
200
  "temperature":0.55
201
+ }),
202
+ timeout=None
203
  )
204
 
205
  print(time() - stopwatch)
 
219
  ],
220
  "max_tokens": max(token_limit, 4096),
221
 
222
+ }),
223
+ timeout=None
224
  )
225
 
226
  _r_content = _r.json()['choices'][0]['message']['content'].split('\n\n',1)[1]
 
235
  ],
236
  "max_tokens": max(token_limit, 4096),
237
 
238
+ }),
239
+ timeout=None
240
  )
241
 
242
  _w_content = _w.json()['choices'][0]['message']['content'].split('\n\n',1)[1]