()
| 37 | @app.route('/api/extend_workflow', methods=['POST']) |
| 38 | @cross_origin() |
| 39 | def extend_workflow(): |
| 40 | try: |
| 41 | request_content = request.get_json() |
| 42 | task_prompt = request_content['task_prompt'] |
| 43 | current_workflow = request_content['current_workflow'] |
| 44 | step = request_content['step'] |
| 45 | sub_workflow = llm.extend_workflow(task_prompt, current_workflow, step) |
| 46 | return sub_workflow, 200 |
| 47 | except Exception as e: |
| 48 | app.logger.error( |
| 49 | 'failed to extend_workflow, msg:%s, request data:%s' % (str(e), request.json)) |
| 50 | return {'errmsg': 'internal errors'}, 500 |
| 51 | |
| 52 | @app.route('/api/execute', methods=['POST']) |
| 53 | @cross_origin() |
nothing calls this directly
no test coverage detected