Skip to content

Commit

Permalink
feat: AI dialogue roles support obtaining data from other nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohuzhang1 committed Dec 27, 2024
1 parent f111ae1 commit d1be102
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def execute(self, model_id, system, prompt, dialogue_number, history_chat_record
self.context['history_message'] = history_message
question = self.generate_prompt_question(prompt)
self.context['question'] = question.content
system = self.workflow_manage.generate_prompt(system)
self.context['system'] = question.content
message_list = self.generate_message_list(system, prompt, history_message)
self.context['message_list'] = message_list
if stream:
Expand Down Expand Up @@ -156,7 +158,7 @@ def get_details(self, index: int, **kwargs):
'name': self.node.properties.get('stepName'),
"index": index,
'run_time': self.context.get('run_time'),
'system': self.node_params.get('system'),
'system': self.context.get('system'),
'history_message': [{'content': message.content, 'role': message.type} for message in
(self.context.get('history_message') if self.context.get(
'history_message') is not None else [])],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ def execute(self, model_id, system, prompt, dialogue_number, history_chat_record
self.context['history_message'] = history_message
question = self.generate_prompt_question(prompt)
self.context['question'] = question.content
system = self.workflow_manage.generate_prompt(system)
self.context['system'] = question.content
message_list = self.generate_message_list(system, prompt, history_message)
self.context['message_list'] = message_list
if stream:
Expand Down Expand Up @@ -138,7 +140,7 @@ def get_details(self, index: int, **kwargs):
'name': self.node.properties.get('stepName'),
"index": index,
'run_time': self.context.get('run_time'),
'system': self.node_params.get('system'),
'system': self.context.get('system'),
'history_message': [{'content': message.content, 'role': message.type} for message in
(self.context.get('history_message') if self.context.get(
'history_message') is not None else [])],
Expand Down

0 comments on commit d1be102

Please sign in to comment.