Skip to content

Commit e11c550

Browse files
authored
fix: Simple application model dialogue model error not returned (#2514)
1 parent 82b566d commit e11c550

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,20 @@ def event_content(response,
135135
add_access_num(client_id, client_type, manage.context.get('application_id'))
136136
except Exception as e:
137137
logging.getLogger("max_kb_error").error(f'{str(e)}:{traceback.format_exc()}')
138-
all_text = '异常' + str(e)
138+
all_text = 'Exception:' + str(e)
139139
write_context(step, manage, 0, 0, all_text)
140140
post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text,
141141
all_text, manage, step, padding_problem_text, client_id)
142142
add_access_num(client_id, client_type, manage.context.get('application_id'))
143-
yield manage.get_base_to_response().to_stream_chunk_response(chat_id, str(chat_record_id), all_text,
144-
'ai-chat-node',
145-
[], True, 0, 0,
146-
{'node_is_end': True, 'view_type': 'many_view',
147-
'node_type': 'ai-chat-node'})
143+
yield manage.get_base_to_response().to_stream_chunk_response(chat_id, str(chat_record_id), 'ai-chat-node',
144+
[], all_text,
145+
False,
146+
0, 0, {'node_is_end': False,
147+
'view_type': 'many_view',
148+
'node_type': 'ai-chat-node',
149+
'real_node_id': 'ai-chat-node',
150+
'reasoning_content': ''})
151+
148152

149153

150154
class BaseChatStep(IChatStep):

0 commit comments

Comments
 (0)