修复写入错误的库文件,增加统计单次对话耗时

This commit is contained in:
w_xiaolizu
2023-06-04 22:40:10 +08:00
parent b11807f35d
commit 7b83ba6c47
2 changed files with 8 additions and 2 deletions

View File

@ -53,6 +53,7 @@ def ArgsGeneralWrapper(f):
chatbot, history, system_prompt, models, plugin_advanced_arg, ipaddr: gr.Request, *args):
""""""
# 引入一个有cookie的chatbot
start_time = time.time()
cookies.update({
'top_p':top_p,
'temperature':temperature,
@ -63,7 +64,8 @@ def ArgsGeneralWrapper(f):
'top_p':top_p,
'max_length': max_length,
'temperature': temperature,
'ipaddr': ipaddr.client.host
'ipaddr': ipaddr.client.host,
'start_time': start_time
}
plugin_kwargs = {
"advanced_arg": plugin_advanced_arg