From f2b46225acc7ed84dddb0cffb0ac0f03ab2720ab Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Fri, 2 Aug 2024 13:55:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=AE=BE=E7=BD=AE=E7=9B=B4=E6=8E=A5=E8=BE=93?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flow/step_node/ai_chat_step_node/impl/base_chat_node.py | 2 ++ .../flow/step_node/question_node/impl/base_question_node.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apps/application/flow/step_node/ai_chat_step_node/impl/base_chat_node.py b/apps/application/flow/step_node/ai_chat_step_node/impl/base_chat_node.py index 06dec696b..5fb38c122 100644 --- a/apps/application/flow/step_node/ai_chat_step_node/impl/base_chat_node.py +++ b/apps/application/flow/step_node/ai_chat_step_node/impl/base_chat_node.py @@ -6,6 +6,7 @@ @date:2024/6/4 14:30 @desc: """ +import time from functools import reduce from typing import List, Dict @@ -26,6 +27,7 @@ def _write_context(node_variable: Dict, workflow_variable: Dict, node: INode, wo node.context['answer'] = answer node.context['history_message'] = node_variable['history_message'] node.context['question'] = node_variable['question'] + node.context['run_time'] = time.time() - node.context['start_time'] if workflow.is_result(): workflow.answer += answer diff --git a/apps/application/flow/step_node/question_node/impl/base_question_node.py b/apps/application/flow/step_node/question_node/impl/base_question_node.py index ae0d404d2..5367b1dc2 100644 --- a/apps/application/flow/step_node/question_node/impl/base_question_node.py +++ b/apps/application/flow/step_node/question_node/impl/base_question_node.py @@ -6,6 +6,7 @@ @date:2024/6/4 14:30 @desc: """ +import time from functools import reduce from typing import List, Dict @@ -26,6 +27,7 @@ def _write_context(node_variable: Dict, workflow_variable: Dict, node: INode, wo node.context['answer'] = answer node.context['history_message'] = node_variable['history_message'] node.context['question'] = node_variable['question'] + node.context['run_time'] = time.time() - node.context['start_time'] if workflow.is_result(): workflow.answer += answer