#!/usr/bin/env python """ Test AI with LARGE INPUT (5000+ tokens) and LARGE OUTPUT (5000+ tokens) This simulates real content generation scenarios """ import os, sys, django sys.path.insert(0, '/app') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'igny8_core.settings') django.setup() import requests from igny8_core.modules.system.models import IntegrationSettings from igny8_core.auth.models import Account account = Account.objects.filter(slug='aws-admin').first() settings = IntegrationSettings.objects.filter(integration_type='openai', account=account, is_active=True).first() config = settings.config or {} api_key = config.get('apiKey') model = config.get('model', 'gpt-4o') print(f"๐Ÿงช Testing {model} with LARGE INPUT + LARGE OUTPUT") print("=" * 80) print() # Create a VERY LONG prompt to ensure input > 5000 tokens # Including detailed outline, examples, and extensive instructions large_prompt = """You are a professional content writer. Generate a complete, comprehensive article following this detailed specification. ## Article Topic: "Complete Guide to Organic Cotton Bedding: Benefits, Types, and Buying Guide" ## Target Word Count: 2500+ words (approximately 3500+ tokens in output) ## JSON Output Format Required: { "title": "article title", "meta_title": "SEO title under 60 chars", "meta_description": "SEO description under 160 chars", "content": "", "word_count": actual_word_count, "primary_keyword": "organic cotton bedding", "secondary_keywords": ["eco-friendly bedding", "sustainable sheets", "organic duvet covers"], "tags": ["organic bedding", "sustainable home", "eco-friendly textiles", "cotton sheets", "bedroom essentials"], "categories": ["Home & Living > Bedding", "Sustainable Living > Eco-Friendly Products"] } ## DETAILED CONTENT STRUCTURE (Each section must be fully written with examples, data, and depth): ### Section 1: Introduction (300 words) Write a compelling introduction that: - Opens with an engaging hook about the rise of organic bedding - Explains why consumers are switching from conventional to organic cotton - Discusses market trends and growth statistics - Mentions health concerns with conventional bedding - Previews what readers will learn in this comprehensive guide - Naturally incorporates the primary keyword "organic cotton bedding" ### Section 2: Understanding Organic Cotton (400 words) Write a detailed section covering: - Definition of organic cotton and GOTS (Global Organic Textile Standard) certification - Differences between organic and conventional cotton farming practices - Specific pesticides and chemicals avoided in organic farming - Water usage statistics (organic vs conventional) - Soil health and crop rotation practices - Carbon footprint comparison data - Other certifications to look for (OEKO-TEX, Fair Trade, etc.) - Include specific examples of organic cotton farms and their practices - Mention leading organic cotton producing regions globally ### Section 3: Health Benefits of Organic Cotton Bedding (400 words) Comprehensive coverage of: - Hypoallergenic properties and why they matter - Impact on sensitive skin and skin conditions (eczema, psoriasis, allergies) - Chemical residues in conventional bedding and health risks - Dermatologist recommendations and clinical studies - Respiratory benefits from chemical-free textiles - Benefits for babies and children - Real customer testimonials and experiences - Comparison of skin irritation rates between organic and conventional bedding - Long-term health advantages ### Section 4: Environmental Impact and Sustainability (400 words) Detailed analysis including: - Water conservation statistics (gallons saved per pound of cotton) - Pesticide elimination impact on ecosystems - Biodiversity benefits for pollinators and wildlife - Soil degradation prevention through organic farming - Carbon emissions comparison with conventional cotton - Impact on farmer health and community welfare - Waste reduction in textile production - End-of-life biodegradability - Circular economy considerations - Case studies of sustainable bedding brands ### Section 5: Types of Organic Cotton Bedding (350 words) Comprehensive overview of: - Organic cotton sheets (fitted, flat, pillowcases) - Thread count ranges and what they mean - Weave types: percale, sateen, jersey, flannel - Specific characteristics of each weave - Organic cotton duvet covers and comforters - Fill power and warmth ratings - Seasonal considerations - Organic cotton mattress protectors and pads - Waterproof vs breathable options - Organic cotton blankets and throws - Specialty items (body pillows, Euro shams, bed skirts) - Price ranges for each category - Brand examples for each product type ### Section 6: Quality Factors and What to Look For (350 words) In-depth buying guidance: - Thread count myths and realities (why 800+ isn't always better) - Ply differences (single-ply vs multi-ply) - Weave construction details - Fabric weight and GSM (grams per square meter) - Fiber length and quality grades - Color fastness and dye methods (low-impact dyes) - Shrinkage rates and pre-washing - Durability testing standards - Pilling resistance - How to verify authentic organic certification - Red flags for fake "organic" claims ### Section 7: Top Organic Cotton Bedding Brands (400 words) Detailed brand reviews including: - Coyuchi: Product range, price points, unique features, customer ratings - Boll & Branch: Signature products, fair trade practices, pricing - Parachute: Material quality, design aesthetic, value proposition - Pottery Barn Organic: Accessibility, variety, retail presence - West Elm Organic: Style options, price range, sustainability initiatives - SOL Organics: Budget-friendly options, certification details - Avocado: Premium positioning, additional eco-features - Include specific product examples from each brand - Price comparison table format - Warranty and return policy highlights ### Section 8: Care and Maintenance (300 words) Comprehensive care instructions: - Initial washing recommendations before first use - Water temperature guidelines for different weaves - Detergent recommendations (eco-friendly, fragrance-free) - Drying methods: air-dry vs machine dry - Ironing tips for different weaves - Stain removal techniques for organic cotton - Frequency of washing for longevity - Storage recommendations for seasonal items - How to maintain whiteness without bleach - Expected lifespan with proper care (5-10 years) - When to replace bedding ### Section 9: Cost Analysis and Value Proposition (300 words) Financial breakdown: - Price range overview: budget ($50-100), mid-range ($100-250), premium ($250-500+) - Cost per use calculation over 5 years - Durability comparison with conventional bedding - Health cost savings (reduced allergies, better sleep) - Environmental value beyond personal use - Sale and discount timing (when to buy) - Starter set recommendations for budget-conscious buyers - Investment prioritization (which pieces to buy first) - Comparison with luxury conventional bedding prices ### Section 10: Where to Buy (200 words) Shopping guide including: - Direct-to-consumer brands (online) - Major retailers (Pottery Barn, West Elm, Crate & Barrel) - Amazon and online marketplaces (verification tips) - Local organic stores and boutiques - Outlet and discount sources - International shipping considerations - Return policies and trial periods - Customer service quality comparisons ### Section 11: Conclusion (150 words) Wrap up with: - Summary of key benefits - Final recommendations for different buyer types - Call to action - Future of organic bedding industry ## Writing Requirements: - Use active voice throughout - Include specific data points, statistics, and examples - Vary sentence structure for natural flow - Use HTML tags properly:

,

,

,