Spaces:
Sleeping
Sleeping
Download src/gaia/config/default.py from jm-vis/Final_Assignment_GAIAAgent: direct link, hf CLI and curl.
- Browser
- Download file 3.57 kB
-
https://huggingface.co/spaces/jm-vis/Final_Assignment_GAIAAgent/resolve/main/src/gaia/config/default.py
- Command line
-
hf download hf://spaces/jm-vis/Final_Assignment_GAIAAgent/src/gaia/config/default.py
-
curl -L -o default.py https://huggingface.co/spaces/jm-vis/Final_Assignment_GAIAAgent/resolve/main/src/gaia/config/default.py
3.57 kB
| """ | |
| Default configuration values for the GAIA agent. | |
| This module defines the default configuration structure and values used by GAIA | |
| when no overrides are provided. It serves as both documentation of available | |
| options and as a fallback when specific values are not set in environment | |
| variables or configuration files. | |
| """ | |
| from typing import Dict, Any | |
| # Default Configuration Dictionary | |
| DEFAULT_CONFIG: Dict[str, Any] = { | |
| # API Keys and Endpoints (Empty by default, should be provided by env vars) | |
| "api": { | |
| "openai": { | |
| "api_key": "", | |
| "api_base": "https://api.openai.com/v1", | |
| }, | |
| "serper": { | |
| "api_key": "", | |
| "api_url": "https://google.serper.dev/search", | |
| }, | |
| "perplexity": { | |
| "api_key": "", | |
| "api_url": "https://api.perplexity.ai", | |
| }, | |
| "supabase": { | |
| "key": "", | |
| "url": "https://tjamxhvvtnypbadvrkjq.supabase.co", | |
| "project_id": "tjamxhvvtnypbadvrkjq", | |
| "project_name": "HF_GAIA_Assessment_AGT", | |
| }, | |
| "huggingface": { | |
| "token": "", | |
| "api_url": "https://api-inference.huggingface.co/models", | |
| }, | |
| }, | |
| # Model Configuration | |
| "models": { | |
| "default_model": "gpt-4o", | |
| "embedding_model": "text-embedding-3-large", | |
| "fallback_model": "gpt-3.5-turbo", | |
| "vision_model": "gpt-4o", | |
| "reasoning_model": "gpt-4o", | |
| "temperature": 0.1, | |
| "max_tokens": 4096, | |
| }, | |
| # Tool Configuration | |
| "tools": { | |
| "web_search": { | |
| "result_count": 5, | |
| "timeout": 10, | |
| }, | |
| "arxiv": { | |
| "max_results": 3, | |
| }, | |
| "duckduckgo": { | |
| "timeout": 10, | |
| "max_results": 5, | |
| }, | |
| "perplexity": { | |
| "timeout": 30, | |
| "model": "sonar-reasoning", | |
| }, | |
| "web_scraping": { | |
| "timeout": 15, | |
| "max_links": 3, | |
| "max_content_length": 10000, | |
| }, | |
| }, | |
| # Memory Settings | |
| "memory": { | |
| "enabled": True, | |
| "table_name": "gaia_memory", | |
| "ttl": 86400, # 24 hours in seconds | |
| "cache_size": 100, | |
| "similarity_threshold": 0.85, | |
| "max_entries": 1000, | |
| # Memory Components | |
| "supabase": { | |
| "enabled": False, # Disabled by default until credentials are provided | |
| }, | |
| "conversation": { | |
| "enabled": True, | |
| }, | |
| "cache": { | |
| "enabled": True, | |
| }, | |
| "working": { | |
| "enabled": True, | |
| }, | |
| }, | |
| # Agent Settings | |
| "agent": { | |
| "max_iterations": 10, | |
| "verbose": False, | |
| "timeout": 300, # 5 minutes in seconds | |
| "max_retries": 3, | |
| "retry_delay": 2, # seconds | |
| "parallel_tool_execution": False, | |
| }, | |
| # Logging Configuration | |
| "logging": { | |
| "level": "INFO", | |
| "file": "gaia_agent.log", | |
| "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s", | |
| }, | |
| # Multimodal Settings | |
| "multimodal": { | |
| "image_max_size": 1024, # pixels | |
| "image_format": "JPEG", | |
| "vision_detail_level": "high", # low, medium, high | |
| }, | |
| # Web Browsing Settings | |
| "browser": { | |
| "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", | |
| "timeout": 30, | |
| "headless": True, | |
| "images_enabled": True, | |
| }, | |
| } |