Spaces:
Runtime error
Runtime error
# Configuration file for GAIA Agent | |
# Model Configuration | |
MODEL_CONFIG = { | |
"model_id": "microsoft/DialoGPT-medium", # Lightweight model for resource constraints | |
"max_tokens": 512, # Reduced for memory efficiency | |
"temperature": 0.1, # Low temperature for factual responses | |
"fallback_model": "gpt-3.5-turbo", # Fallback if primary model fails | |
} | |
# Agent Configuration | |
AGENT_CONFIG = { | |
"max_iterations": 5, # Limit iterations to prevent infinite loops | |
"verbosity_level": 1, # Moderate verbosity for debugging | |
"timeout_seconds": 30, # Timeout for individual operations | |
"max_retries": 2, # Number of retries for failed operations | |
} | |
# Tool Configuration | |
TOOL_CONFIG = { | |
"web_search": { | |
"enabled": True, | |
"max_results": 5, # Limit search results for efficiency | |
"timeout": 10, | |
}, | |
"calculator": { | |
"enabled": True, | |
"safe_mode": True, # Only allow safe mathematical expressions | |
}, | |
"image_analyzer": { | |
"enabled": True, | |
"max_image_size": 5 * 1024 * 1024, # 5MB limit | |
"supported_formats": [".jpg", ".jpeg", ".png", ".gif", ".bmp"], | |
}, | |
"file_reader": { | |
"enabled": True, | |
"max_file_size": 10 * 1024 * 1024, # 10MB limit | |
"supported_formats": [".txt", ".csv", ".json", ".md", ".py", ".js", ".html", ".css"], | |
}, | |
"data_processor": { | |
"enabled": True, | |
"max_data_points": 10000, # Limit for large datasets | |
} | |
} | |
# Performance Configuration | |
PERFORMANCE_CONFIG = { | |
"memory_limit_mb": 2048, # 2GB memory limit per process | |
"cpu_limit_percent": 80, # Maximum CPU usage | |
"garbage_collection_frequency": 10, # Run GC every N operations | |
"cache_size": 100, # Number of cached responses | |
} | |
# API Configuration | |
API_CONFIG = { | |
"default_api_url": "https://agents-course-unit4-scoring.hf.space", | |
"request_timeout": 60, | |
"max_concurrent_requests": 2, # Limit concurrent requests | |
} | |