Skip to content

Commit bd47349

Browse files
authored
fix: Application The parent application embeds the child application and sets the variable by passing the parameter "akser" through the interface. The sub application is not displayed in the conversation log (#4471)
1 parent 32e5b32 commit bd47349

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

apps/application/flow/step_node/application_node/impl/base_application_node.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,14 @@ def save_context(self, details, workflow_manage):
171171
if self.node_params.get('is_result', False):
172172
self.answer_text = details.get('answer')
173173

174+
def get_chat_asker(self, kwargs):
175+
asker = kwargs.get('asker')
176+
if asker:
177+
if isinstance(asker, dict):
178+
return asker
179+
return {'username': asker}
180+
return self.workflow_manage.work_flow_post_handler.chat_info.get_chat_user()
181+
174182
def execute(self, application_id, message, chat_id, chat_record_id, stream, re_chat,
175183
chat_user_id,
176184
chat_user_type,
@@ -185,7 +193,8 @@ def execute(self, application_id, message, chat_id, chat_record_id, stream, re_c
185193
'application_id': application_id,
186194
'abstract': message[0:1024],
187195
'chat_user_id': chat_user_id,
188-
'chat_user_type': chat_user_type
196+
'chat_user_type': chat_user_type,
197+
'asker': self.get_chat_asker(kwargs)
189198
})
190199
if app_document_list is None:
191200
app_document_list = []

apps/application/models/application_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ChatUserType(models.TextChoices):
2626

2727

2828
def default_asker():
29-
return {'user_name': '游客'}
29+
return {'username': '游客'}
3030

3131

3232
class Chat(AppModelMixin):

0 commit comments

Comments
 (0)