Spaces:
Sleeping
Sleeping
Upload 37 files
Browse files- src/rag_engine.py +4 -3
src/rag_engine.py
CHANGED
|
@@ -548,16 +548,17 @@ Question:
|
|
| 548 |
streamed = False
|
| 549 |
last_err = None
|
| 550 |
|
| 551 |
-
#
|
| 552 |
candidate_models = [clean_model]
|
| 553 |
-
for m in ["qwen/qwen3.8-27b", "qwen/qwen3.6-27b"]:
|
| 554 |
if m not in candidate_models:
|
| 555 |
candidate_models.append(m)
|
| 556 |
|
| 557 |
for g_model in candidate_models:
|
| 558 |
if streamed:
|
| 559 |
break
|
| 560 |
-
|
|
|
|
| 561 |
for client in groq_clients:
|
| 562 |
try:
|
| 563 |
completion = client.chat.completions.create(
|
|
|
|
| 548 |
streamed = False
|
| 549 |
last_err = None
|
| 550 |
|
| 551 |
+
# Candidate models with high rate limit and reasoning power
|
| 552 |
candidate_models = [clean_model]
|
| 553 |
+
for m in ["qwen/qwen3.8-27b", "llama-3.3-70b-versatile", "qwen/qwen3.6-27b", "llama-3.1-8b-instant"]:
|
| 554 |
if m not in candidate_models:
|
| 555 |
candidate_models.append(m)
|
| 556 |
|
| 557 |
for g_model in candidate_models:
|
| 558 |
if streamed:
|
| 559 |
break
|
| 560 |
+
# Groq on-demand limits max output tokens per minute (OTPM) to 1000 on some tiers
|
| 561 |
+
max_tokens = 1000
|
| 562 |
for client in groq_clients:
|
| 563 |
try:
|
| 564 |
completion = client.chat.completions.create(
|