Skip to content

sys.files not populated when files are included #18

Description

@william-schaller

Hi, thanks a lot for this module, it's been a great help!

I'm trying to use the new file upload feature but facing an issue. I added some extra logging to the provider to try and debug what is going wrong but have hit a wall. I am using a Chatflow which should be accepting the default sys.files input variable. When the provider sends the request to the Dify API it does contain the successfully uploaded file:

{
      "inputs": {},
      "query": "summarise this document",
      "response_mode": "streaming",
      "user": "will",
      "files": [ // Correctly populated here
        {
          "type": "document",
          "transfer_method": "local_file",
          "upload_file_id": "bbe7e..."
        }
      ]
}

However it seems to get silently dropped by the next step, when the workflow starts, and is not included as sys.files:

{
      "event": "workflow_started",
      "conversation_id": "4e3e3...",
      "message_id": "0a318...",
      "task_id": "4e270...",
      "created_at": 1773749155,
      "workflow_run_id": "26ec8...",
      "data": {
        "id": "26ec8...",
        "workflow_id": "2bf9f...",
        "created_at": 1773749155,
        "inputs": {
          "sys.files": [], // Empty here
          "sys.user_id": "will",
          "sys.app_id": "d33e5...",
          "sys.workflow_id": "2bf9f...",
          "sys.workflow_run_id": "26ec8...",
          "sys.query": "summarise this document",
          "sys.dialogue_count": 1
        }
      }
}

Does anyone know how to address this? Thanks in advance 🙂

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions