Skip to content

Commit c334dbb

Browse files
committed
refactor: clean up imports and improve code readability in base_chat_step.py
1 parent 1715f9d commit c334dbb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from application.flow.tools import Reasoning, mcp_response_generator, get_tools
2626
from application.long_term_memory import extract_long_term_memory
2727
from application.models import ApplicationChatUserStats, ChatUserType, Application, ApplicationApiKey, \
28-
ApplicationAccessToken, ApplicationLongTermMemory, ChatRecord
28+
ApplicationAccessToken, ApplicationLongTermMemory
2929
from common.exception.app_exception import AppApiException
3030
from common.utils.logger import maxkb_logger
3131
from common.utils.rsa_util import rsa_long_decrypt
@@ -160,7 +160,6 @@ def event_content(response,
160160
'reasoning_content': ''})
161161

162162

163-
164163
class BaseChatStep(IChatStep):
165164
def execute(self, message_list: List[BaseMessage],
166165
chat_id,
@@ -184,9 +183,10 @@ def execute(self, message_list: List[BaseMessage],
184183
skill_tool_ids=None,
185184
mcp_output_enable=True,
186185
**kwargs):
187-
chat_model = get_model_instance_by_model_workspace_id(model_id, workspace_id,
188-
**(
189-
model_params_setting or {})) if model_id is not None else None
186+
chat_model = get_model_instance_by_model_workspace_id(
187+
model_id, workspace_id,
188+
**(model_params_setting or {})
189+
) if model_id is not None else None
190190
if stream:
191191
return self.execute_stream(message_list, chat_id, problem_text, post_response_handler, chat_model,
192192
paragraph_list,

0 commit comments

Comments
 (0)