Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 31 |
# --- Agent configuration ---
|
| 32 |
# Any chat model served by HF Inference Providers with tool calling works here.
|
| 33 |
# You can override it with a MODEL_ID variable in the Space settings.
|
| 34 |
-
MODEL_ID = os.getenv("MODEL_ID", "
|
| 35 |
MAX_CHARS = 20000 # cap on text returned by tools, to keep the context small
|
| 36 |
HEADERS = {"User-Agent": "Mozilla/5.0 (GAIA agent - HF Agents Course)"}
|
| 37 |
|
|
@@ -149,7 +149,7 @@ class BasicAgent:
|
|
| 149 |
|
| 150 |
llm = ChatOpenAI(
|
| 151 |
model=MODEL_ID,
|
| 152 |
-
base_url=os.getenv("LLM_BASE_URL", "https://
|
| 153 |
api_key=os.getenv("LLM_API_KEY") or os.environ["HF_TOKEN"],
|
| 154 |
temperature=0,
|
| 155 |
max_retries=5, # riprova in caso di rate limit (429)
|
|
|
|
| 31 |
# --- Agent configuration ---
|
| 32 |
# Any chat model served by HF Inference Providers with tool calling works here.
|
| 33 |
# You can override it with a MODEL_ID variable in the Space settings.
|
| 34 |
+
MODEL_ID = os.getenv("MODEL_ID", "llama-3.3-70b-versatile")
|
| 35 |
MAX_CHARS = 20000 # cap on text returned by tools, to keep the context small
|
| 36 |
HEADERS = {"User-Agent": "Mozilla/5.0 (GAIA agent - HF Agents Course)"}
|
| 37 |
|
|
|
|
| 149 |
|
| 150 |
llm = ChatOpenAI(
|
| 151 |
model=MODEL_ID,
|
| 152 |
+
base_url=os.getenv("LLM_BASE_URL", "https://api.groq.com/openai/v1"),
|
| 153 |
api_key=os.getenv("LLM_API_KEY") or os.environ["HF_TOKEN"],
|
| 154 |
temperature=0,
|
| 155 |
max_retries=5, # riprova in caso di rate limit (429)
|