How to attach a pdf file when calling ai_task.generate_data?

I want to use Home Assistant to help me analyze the energy usage. Every last day of the month, an automation will download a billing PDF file and save to /config/billing/<month>.pdf. I’d like to call ai_task and attach that file as context. However, it seems that the ai_task.generate_data action only accepts attachment from media_selector. Is there a way to attach any type of file when generating response?
Thanks!


Update:

    - action: ai_task.generate_data
      data:
        task_name: >-
          Analyze the bill and tell me the trend.
        instructions: "Analyze the bill and tell me the trend."
        attachments:
          - media_content_id: "media-source://media_source/local/bill.html"
            media_content_type: text/html
        entity_id: ai_task.google_ai_task
      response_variable: ai_result