mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
fix: 修复 当前时间变量输出时建议输出正常的时间格式
This commit is contained in:
parent
90428641d9
commit
d7984e1192
|
|
@ -55,7 +55,7 @@ class WorkFlowPostHandler:
|
|||
details=details,
|
||||
message_tokens=message_tokens,
|
||||
answer_tokens=answer_tokens,
|
||||
run_time=time.time() - workflow.context['time'],
|
||||
run_time=time.time() - workflow.context['start_time'],
|
||||
index=0)
|
||||
self.chat_info.append_chat_record(chat_record, self.client_id)
|
||||
# 重新设置缓存
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
@desc:
|
||||
"""
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
from application.flow.i_step_node import NodeResult
|
||||
from application.flow.step_node.start_node.i_start_node import IStarNode
|
||||
|
|
@ -17,7 +18,8 @@ class BaseStartStepNode(IStarNode):
|
|||
"""
|
||||
开始节点 初始化全局变量
|
||||
"""
|
||||
return NodeResult({'question': question}, {'time': time.time()})
|
||||
return NodeResult({'question': question},
|
||||
{'time': datetime.now().strftime('%Y-%m-%d %H:%M:%S'), 'start_time': time.time()})
|
||||
|
||||
def get_details(self, index: int, **kwargs):
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in New Issue