File size: 1,963 Bytes
032fc84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# 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
}