gopidesupavan commented on PR #64077:
URL: https://github.com/apache/airflow/pull/64077#issuecomment-4130233940

   with file image input:
   
   <img width="1394" height="676" alt="image" 
src="https://github.com/user-attachments/assets/d29db84f-0408-48a4-9010-6fcc2b21c4d8";
 />
   
   
   ```
   from datetime import datetime
   
   from airflow.providers.common.ai.operators.llm_file_analysis import 
LLMFileAnalysisOperator
   from airflow.providers.common.compat.sdk import dag, task
   
   @dag(
       dag_id="example_llm_file_analysis_images",
       schedule=None,
       start_date=datetime(2024, 1, 1),
       catchup=False,
   )
   def example_llm_file_analysis_images():
       t1 = LLMFileAnalysisOperator(
           task_id="analyze_orders_csv",
           llm_conn_id="pydanticai_default",  # replace with any configured LLM 
connection
           file_path="/opt/airflow/task-sdk/docs/img/airflow-3-task-sdk.png",
           prompt=(
               "Analyze this file. "
               "What are the various components existing in the file 
architecture diagram? "
           ),
           sample_rows=10,
           model_id="google-gla:gemini-2.5-pro",
           multi_modal=True,
       )
   
       @task
       def print_result(result):
           print(result)
   
       t1 >> print_result(t1.output)
   
   
   example_llm_file_analysis_images()
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to