| | |
| | | except Exception as e: |
| | | logger.error(e) |
| | | inputs = { |
| | | "input_files": [] |
| | | } |
| | | files = [] |
| | | for file in upload_files: |
| | | inputs["input_files"].append({ |
| | | files.append({ |
| | | "type": "document", |
| | | "transfer_method": "local_file", |
| | | "url": "", |
| | | "upload_file_id": file |
| | | }) |
| | | if workflow_type == 1: |
| | | inputs["input_files"] = files |
| | | if workflow_type == 2: |
| | | inputs["file_list"] = files |
| | | inputs["Completion_of_main_indicators"] = title |
| | | token = settings.dify_workflow_report |
| | | complete_response = "" |
| | |
| | | return Response(code=200, msg="", data=result) |
| | | |
| | | elif agent_id == "basic_paper_agent": |
| | | service = BasicService(base_url=settings.basic_paper_url) |
| | | ... |
| | | # service = BasicService(base_url=settings.basic_paper_url) |
| | | # result = await service.paper_file_upload(chat_id, file.filename, file_content) |
| | | |
| | | elif agent.agent_type == AgentType.DIFY: |