Spaces:
Sleeping
Sleeping
remove xai_api_base stuff
Browse files
agent.py
CHANGED
|
@@ -80,18 +80,6 @@ class QAgent:
|
|
| 80 |
if not api_key:
|
| 81 |
raise ValueError("No OpenAI API key provided. Please set Q_OAI_TOK or XAI_API_KEY environment variable or pass api_key parameter.")
|
| 82 |
|
| 83 |
-
# If xAI API base is available and no api_base is provided, use it
|
| 84 |
-
if xai_api_base and api_base is None:
|
| 85 |
-
api_base = xai_api_base
|
| 86 |
-
if self.verbose:
|
| 87 |
-
print(f"Using xAI API base URL: {api_base}")
|
| 88 |
-
|
| 89 |
-
# If no API base specified but environment variable available, use it
|
| 90 |
-
if api_base is None:
|
| 91 |
-
api_base = os.getenv("AGENT_API_BASE")
|
| 92 |
-
if api_base and self.verbose:
|
| 93 |
-
print(f"Using API base from AGENT_API_BASE: {api_base}")
|
| 94 |
-
|
| 95 |
self.model = OpenAIServerModel(
|
| 96 |
model_id=model_id or "gpt-4o",
|
| 97 |
api_key=api_key,
|
|
|
|
| 80 |
if not api_key:
|
| 81 |
raise ValueError("No OpenAI API key provided. Please set Q_OAI_TOK or XAI_API_KEY environment variable or pass api_key parameter.")
|
| 82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
self.model = OpenAIServerModel(
|
| 84 |
model_id=model_id or "gpt-4o",
|
| 85 |
api_key=api_key,
|