Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -8,14 +8,12 @@ from tools import web_search, read_file
|
|
| 8 |
class GAIAAgent:
|
| 9 |
def __init__(self):
|
| 10 |
# Store API key directly since .env is blocked
|
| 11 |
-
self.xai_api_key =
|
| 12 |
self.serpapi_key = None # Will use fallback web search
|
| 13 |
# Try different possible base URLs
|
| 14 |
self.possible_base_urls = [
|
| 15 |
-
"https://
|
| 16 |
-
|
| 17 |
-
"https://grok.x.ai/v1",
|
| 18 |
-
"https://grok.x.ai"
|
| 19 |
]
|
| 20 |
self.base_url = self.possible_base_urls[0] # Start with first option
|
| 21 |
|
|
|
|
| 8 |
class GAIAAgent:
|
| 9 |
def __init__(self):
|
| 10 |
# Store API key directly since .env is blocked
|
| 11 |
+
self.xai_api_key = os.environ.get('HF_TOKEN')
|
| 12 |
self.serpapi_key = None # Will use fallback web search
|
| 13 |
# Try different possible base URLs
|
| 14 |
self.possible_base_urls = [
|
| 15 |
+
"https://router.huggingface.co/v1",
|
| 16 |
+
|
|
|
|
|
|
|
| 17 |
]
|
| 18 |
self.base_url = self.possible_base_urls[0] # Start with first option
|
| 19 |
|