Skip to content
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏭 Langflow Factory

Custom Component Library for Langflow - Extending AI Workflow Capabilities

License: MIT Python 3.8+ Langflow

🌟 Overview

Langflow Factory is a comprehensive collection of custom components designed to extend Langflow's capabilities with powerful integrations, data processing tools, and AI-powered generators. Built with production-ready patterns and extensive error handling.

πŸš€ Features

πŸ”— API Integrations

  • Google Cloud Platform: BigQuery, Cloud Scheduler, Drive integration
  • WhatsApp/Evolution API: Complete messaging automation
  • Google Sheets: Read, write, and query operations
  • Apollo: Organization search capabilities
  • Astra DB: Vector database operations

πŸ“Š Data Processing

  • Enhanced DataFrame Operations: Advanced data manipulation
  • File Processing: Multi-format support with encoding detection
  • Structured Output: Type-safe data transformation
  • Data Validation: Robust input/output validation

🎨 AI Generators

  • Image Generation: OpenAI DALL-E, Google Imagen
  • Audio Generation: ElevenLabs, OpenAI TTS
  • Text Processing: Advanced natural language operations

πŸ› οΈ Utilities

  • API Request Builder: Dynamic HTTP client with authentication
  • Conditional Router: Smart flow control
  • Dynamic UI Components: Real-time field updates

πŸ“ Project Structure

langflow-factory/
β”œβ”€β”€ .cursor/                    # Development rules and guidelines
β”‚   β”œβ”€β”€ index.mdc              # Project-wide Cursor rules
β”‚   └── rules/                 # Context-specific rules
β”œβ”€β”€ components/                # Custom Langflow components
β”‚   β”œβ”€β”€ api_request/           # HTTP request builders
β”‚   β”œβ”€β”€ audio_management/      # Audio generation components
β”‚   β”œβ”€β”€ gcp/                   # Google Cloud integrations
β”‚   β”œβ”€β”€ google_sheets/         # Sheets API components
β”‚   β”œβ”€β”€ image_generators/      # Image generation tools
β”‚   └── [other categories]/
β”œβ”€β”€ flows/                     # Example flows and configurations
β”œβ”€β”€ tests/                     # Component testing framework
└── scripts/                   # Utility scripts

🎯 Getting Started

Prerequisites

  • Python 3.8+
  • Langflow installed and running
  • Required API keys for integrations

Installation

  1. Clone the repository:
git clone https://github.com/Empreiteiro/langflow-factory.git
cd langflow-factory
  1. Install dependencies:
pip install -r requirements.txt
  1. Add components to Langflow:
    • Copy component files to your Langflow custom components directory
    • Or load directly through Langflow's component upload feature

Quick Start Example

# Example: Using the Enhanced API Request component
from components.api_request.enchanced_api_request import EnhancedAPIRequest

component = EnhancedAPIRequest()
component.url = "https://api.example.com/data"
component.method = "GET"
result = component.make_request()

πŸ”§ Component Categories

πŸ“‘ API & External Services

  • api_request_builder.py - Dynamic HTTP request construction
  • enchanced_api_request.py - Advanced API client with retry logic
  • apollo_organization_search.py - Company data retrieval
  • astra_db.py - Vector database operations

☁️ Google Cloud Platform

  • cloud_scheduler - Automated job scheduling
  • enchanced_big_query.py - BigQuery data operations
  • google_drive_uploader.py - File upload automation
  • google_sheets/ - Complete Sheets API integration

πŸ’¬ Communication

  • audio_management/ - Voice and audio generation
  • whatsapp_evolution.py - WhatsApp automation
  • telegram.py - Telegram bot integration

πŸŽ₯ Multi-Modal Processing

  • multi-modal_input.py - Audio, video, and image processing with AI analysis
    • YouTube video download and analysis
    • Audio transcription using OpenAI Whisper
    • Image analysis using GPT-4V
    • Supports direct URLs, YouTube, and Google Drive links

πŸ“Š Data Processing

  • core_data_operations.py - Advanced data manipulation
  • dataFrame_operations - Pandas DataFrame utilities
  • enchanced_structured_output.py - Type-safe outputs

πŸ§ͺ Testing

Run the test suite to ensure components work correctly:

# Run all tests
python -m pytest tests/

# Run specific component tests
python -m pytest tests/test_api_request.py

# Test YouTube download functionality
python scripts/test_youtube_download.py

πŸ”§ Troubleshooting

YouTube Download Issues

If you encounter "Error downloading video from URL: Failed to download media from URL: Failed to download from YouTube: No file downloaded", follow these steps:

  1. Install yt-dlp:
pip install yt-dlp
  1. Install FFmpeg (required for video processing):

  2. Run the installation script:

python scripts/install_dependencies.py
  1. Test the functionality:
python scripts/test_youtube_download.py
  1. Common issues:
    • Private videos: YouTube private videos cannot be downloaded
    • Age-restricted content: May require authentication
    • Region restrictions: Some videos are not available in certain regions
    • Network issues: Check your internet connection
    • yt-dlp version: Ensure you have the latest version: pip install --upgrade yt-dlp

πŸ“š Documentation

Component Development Guidelines

  • Follow the patterns in .cursor/rules/langflow-components.mdc
  • Use proper error handling with self.log()
  • Implement input validation
  • Return structured Data/Message/DataFrame objects

Flow Development

  • Reference .cursor/rules/flow-development.mdc
  • Design for reusability and modularity
  • Include proper error handling paths

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-component)
  3. Follow the development guidelines in .cursor/rules/
  4. Add tests for new components
  5. Commit with descriptive messages
  6. Push and create a Pull Request

πŸ“‹ Component Checklist

When creating new components:

  • Inherits from Component
  • Implements proper error handling
  • Uses self.log() for logging
  • Includes input validation
  • Has comprehensive docstrings
  • Includes example usage
  • Has corresponding tests
  • Follows naming conventions

πŸ” Security

  • Store API keys securely using Langflow's secret management
  • Validate all inputs to prevent injection attacks
  • Use HTTPS for external API calls
  • Follow the security guidelines in component documentation

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Langflow - The amazing low-code AI platform
  • DataStax - For Langflow development and support
  • All contributors who help improve this component library

πŸ“ž Support


Made with ❀️ for the Langflow community

About

Langflow Factory is a comprehensive collection of custom components designed to extend Langflow's capabilities with powerful integrations, data processing tools, and AI-powered generators.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages