Skip to main content

Overview

The File Input tools allow you to fetch files from specified URLs.

Key Features

  • INPUT_PDF_FILE: Fetch PDF files from URLs.
  • INPUT_CSV_FILE: Fetch CSV files from URLs.
  • INPUT_JSON: Input JSON data directly or from URLs.
  • INPUT_FILE: Input generic files from URLs.
  • INPUT_TEXT: Input plain text data directly.

Tools

INPUT_PDF_FILE

Fetch PDF files from URLs for processing. Input:
  • value (string, required): URL of the PDF file to fetch
Output:
  • File content and metadata for further processing

INPUT_CSV_FILE

Fetch CSV files from URLs for data processing. Input:
  • value (string, required): URL of the CSV file to fetch
Output:
  • CSV content and metadata

INPUT_JSON

Input JSON data directly or from URLs. Input:
  • value (object/string, required): JSON data object or URL to JSON file
Output:
  • Parsed JSON data ready for processing

INPUT_FILE

Input generic files from URLs. Input:
  • value (string, required): URL of the file to fetch
  • description (string, optional): Description of the file
Output:
  • File content and metadata

INPUT_TEXT

Input plain text data directly. Input:
  • value (string, required): Plain text content
Output:
  • Text content for processing

Examples

Example: Fetch Files from URLs

- id: "pdf"
  tool: INPUT_PDF_FILE
  input:
    - name: value
      value: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf

- id: "csv"
  tool: INPUT_CSV_FILE
  input:
    - name: value
      value: https://people.sc.fsu.edu/~jburkardt/data/csv/addresses.csv

- id: "json_data"
  tool: INPUT_JSON
  input:
    - name: value
      value: https://api.example.com/data.json

- id: "config_file"
  tool: INPUT_FILE
  input:
    - name: value
      value: https://raw.githubusercontent.com/example/repo/main/config.yaml
    - name: description
      value: "Application configuration file"

- id: "text_input"
  tool: INPUT_TEXT
  input:
    - name: value
      value: "This is sample text content for processing"

Example: JSON Data Processing

- id: user_data
  tool: INPUT_JSON
  input:
    - name: value
      value:
        name: "John Doe"
        age: 30
        email: "john@example.com"
        preferences:
          theme: "dark"
          notifications: true

- id: process_user_data
  tool: OPENAI_INVOKE
  config:
    - name: version
      value: gpt-4
  input:
    - name: prompt
      value: |
        Process this user data and create a personalized greeting:
        {{steps.user_data.result}}
        
        Create a friendly greeting message that includes their name and references their preferences.