chat with the workflow-equipped low-code LLM
(self, task_prompt,confirmed_workflow, history, curr_input)
| 21 | return self.PLLM.extend_workflow(task_prompt, workflow, step) |
| 22 | |
| 23 | def execute(self, task_prompt,confirmed_workflow, history, curr_input): |
| 24 | ''' chat with the workflow-equipped low-code LLM ''' |
| 25 | prompt = [{'role': 'system', "content": 'The overall task you are facing is: '+task_prompt+ |
| 26 | '\nThe standard operating procedure(SOP) is:\n'+self._json2txt(confirmed_workflow)}] |
| 27 | history = prompt + history |
| 28 | response = self.ELLM.execute(curr_input, history) |
| 29 | return response |
| 30 | |
| 31 | def _json2txt(self, workflow_json): |
| 32 | ''' convert the json workflow to text''' |