Call pipeline with json input. Args: pipeline_info (PipelineInfomation): The pipeline information object. pipeline (Pipeline): The pipeline object. body (Dict): The input object, include input and parameters
(pipeline_info: PipelineInfomation,
pipeline: Pipeline, body: str)
| 633 | |
| 634 | |
| 635 | def call_pipeline_with_json(pipeline_info: PipelineInfomation, |
| 636 | pipeline: Pipeline, body: str): |
| 637 | """Call pipeline with json input. |
| 638 | |
| 639 | Args: |
| 640 | pipeline_info (PipelineInfomation): The pipeline information object. |
| 641 | pipeline (Pipeline): The pipeline object. |
| 642 | body (Dict): The input object, include input and parameters |
| 643 | """ |
| 644 | # TODO: is_custom_call misjudgment |
| 645 | # if pipeline_info.is_custom_call: |
| 646 | # pipeline_inputs = body['input'] |
| 647 | # result = pipeline(**pipeline_inputs) |
| 648 | # else: |
| 649 | pipeline_inputs, parameters = service_base64_input_to_pipeline_input( |
| 650 | pipeline_info['task_name'], body) |
| 651 | result = pipeline(pipeline_inputs, **parameters) |
| 652 | |
| 653 | return result |
| 654 | |
| 655 | |
| 656 | def service_base64_input_to_pipeline_input(task_name, body): |
searching dependent graphs…