Spaces:
Sleeping
Sleeping
Switch to zai-glm-4.7: gpt-oss-120b's daily quota is exhausted
Browse filesConfirmed via Cerebras dashboard: gpt-oss-120b hit 1.07M/1M tokens today. Each free-tier model has its own separate daily quota; switch to zai-glm-4.7 for an untouched budget.
app.py
CHANGED
|
@@ -101,7 +101,11 @@ class MemoryTrimmer:
|
|
| 101 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 102 |
class BasicAgent:
|
| 103 |
def __init__(self):
|
| 104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
api_key = os.getenv("CEREBRAS_API_KEY")
|
| 106 |
if not api_key:
|
| 107 |
print("Warning: CEREBRAS_API_KEY is not set - the agent will fail to call the model.")
|
|
@@ -323,7 +327,7 @@ with gr.Blocks() as demo:
|
|
| 323 |
Once clicking on the "submit button, it can take quite some time ( this is the time for the agent to go through all the questions).
|
| 324 |
This space provides a basic setup and is intentionally sub-optimal to encourage you to develop your own, more robust solution. For instance for the delay process of the submit button, a solution could be to cache the answers and submit in a seperate action or even to answer the questions in async.
|
| 325 |
|
| 326 |
-
**Setup:** This agent calls Cerebras (
|
| 327 |
"""
|
| 328 |
)
|
| 329 |
|
|
|
|
| 101 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 102 |
class BasicAgent:
|
| 103 |
def __init__(self):
|
| 104 |
+
# gpt-oss-120b's daily token quota (1M, separate per model on
|
| 105 |
+
# Cerebras) got fully used up mid-session. zai-glm-4.7 has its own
|
| 106 |
+
# untouched 1M/day quota, so switch there rather than waiting ~24h
|
| 107 |
+
# for gpt-oss-120b's to reset.
|
| 108 |
+
model_id = os.getenv("AGENT_MODEL_ID", "cerebras/zai-glm-4.7")
|
| 109 |
api_key = os.getenv("CEREBRAS_API_KEY")
|
| 110 |
if not api_key:
|
| 111 |
print("Warning: CEREBRAS_API_KEY is not set - the agent will fail to call the model.")
|
|
|
|
| 327 |
Once clicking on the "submit button, it can take quite some time ( this is the time for the agent to go through all the questions).
|
| 328 |
This space provides a basic setup and is intentionally sub-optimal to encourage you to develop your own, more robust solution. For instance for the delay process of the submit button, a solution could be to cache the answers and submit in a seperate action or even to answer the questions in async.
|
| 329 |
|
| 330 |
+
**Setup:** This agent calls Cerebras (zai-glm-4.7) via `smolagents`. Get a free key at https://cloud.cerebras.ai and set it as the `CEREBRAS_API_KEY` secret in this Space's settings before running.
|
| 331 |
"""
|
| 332 |
)
|
| 333 |
|