@@ -51,7 +51,8 @@ async def async_request_tgi(
51
51
api_url = request_func_input .api_url
52
52
assert api_url .endswith ("generate_stream" )
53
53
54
- async with aiohttp .ClientSession (trust_env = True , timeout = AIOHTTP_TIMEOUT ) as session :
54
+ async with aiohttp .ClientSession (trust_env = True ,
55
+ timeout = AIOHTTP_TIMEOUT ) as session :
55
56
params = {
56
57
"best_of" : request_func_input .best_of ,
57
58
"max_new_tokens" : request_func_input .output_len ,
@@ -123,7 +124,8 @@ async def async_request_trt_llm(
123
124
api_url = request_func_input .api_url
124
125
assert api_url .endswith ("generate_stream" )
125
126
126
- async with aiohttp .ClientSession (trust_env = True , timeout = AIOHTTP_TIMEOUT ) as session :
127
+ async with aiohttp .ClientSession (trust_env = True ,
128
+ timeout = AIOHTTP_TIMEOUT ) as session :
127
129
assert request_func_input .best_of == 1
128
130
payload = {
129
131
"accumulate_tokens" : True ,
@@ -187,7 +189,8 @@ async def async_request_deepspeed_mii(
187
189
request_func_input : RequestFuncInput ,
188
190
pbar : Optional [tqdm ] = None ,
189
191
) -> RequestFuncOutput :
190
- async with aiohttp .ClientSession (trust_env = True , timeout = AIOHTTP_TIMEOUT ) as session :
192
+ async with aiohttp .ClientSession (trust_env = True ,
193
+ timeout = AIOHTTP_TIMEOUT ) as session :
191
194
assert request_func_input .best_of == 1
192
195
193
196
payload = {
@@ -235,7 +238,8 @@ async def async_request_openai_completions(
235
238
("completions" , "profile" )
236
239
), "OpenAI Completions API URL must end with 'completions' or 'profile'."
237
240
238
- async with aiohttp .ClientSession (trust_env = True , timeout = AIOHTTP_TIMEOUT ) as session :
241
+ async with aiohttp .ClientSession (trust_env = True ,
242
+ timeout = AIOHTTP_TIMEOUT ) as session :
239
243
payload = {
240
244
"model" : request_func_input .model_name \
241
245
if request_func_input .model_name else request_func_input .model ,
@@ -332,7 +336,8 @@ async def async_request_openai_chat_completions(
332
336
"chat/completions"
333
337
), "OpenAI Chat Completions API URL must end with 'chat/completions'."
334
338
335
- async with aiohttp .ClientSession (trust_env = True , timeout = AIOHTTP_TIMEOUT ) as session :
339
+ async with aiohttp .ClientSession (trust_env = True ,
340
+ timeout = AIOHTTP_TIMEOUT ) as session :
336
341
content = [{"type" : "text" , "text" : request_func_input .prompt }]
337
342
if request_func_input .multi_modal_content :
338
343
content .append (request_func_input .multi_modal_content )
0 commit comments