diff --git a/apps/application/chat_pipeline/step/reset_problem_step/impl/base_reset_problem_step.py b/apps/application/chat_pipeline/step/reset_problem_step/impl/base_reset_problem_step.py
index 14a68d49a..fffdf4662 100644
--- a/apps/application/chat_pipeline/step/reset_problem_step/impl/base_reset_problem_step.py
+++ b/apps/application/chat_pipeline/step/reset_problem_step/impl/base_reset_problem_step.py
@@ -28,8 +28,10 @@ class BaseResetProblemStep(IResetProblemStep):
range(start_index if start_index > 0 else 0, len(history_chat_record))]
message_list = [*flat_map(history_message),
HumanMessage(content=prompt.format(**{'question': problem_text}))]
- response = chat_model(message_list)
- padding_problem = response.content[response.content.index('') + 6:response.content.index('')]
+ response = chat_model.invoke(message_list)
+ padding_problem = problem_text
+ if response.content.__contains__("") and response.content.__contains__(''):
+ padding_problem = response.content[response.content.index('') + 6:response.content.index('')]
self.context['message_tokens'] = chat_model.get_num_tokens_from_messages(message_list)
self.context['answer_tokens'] = chat_model.get_num_tokens(padding_problem)
return padding_problem