Upload ai.py
Browse filesMigrate Groq provider to supported GPT OSS model
ai.py
CHANGED
|
@@ -64,7 +64,7 @@ def ask_ai(problem: str, sympy_info: dict, history: list) -> str:
|
|
| 64 |
resp = _post_with_retry(
|
| 65 |
"https://api.groq.com/openai/v1/chat/completions",
|
| 66 |
headers={"Authorization": f"Bearer {key}", "Content-Type": "application/json"},
|
| 67 |
-
json={"model": "
|
| 68 |
"max_tokens": 2048, "temperature": 0.15, "top_p": 0.9},
|
| 69 |
timeout=settings.provider_timeout_seconds
|
| 70 |
)
|
|
|
|
| 64 |
resp = _post_with_retry(
|
| 65 |
"https://api.groq.com/openai/v1/chat/completions",
|
| 66 |
headers={"Authorization": f"Bearer {key}", "Content-Type": "application/json"},
|
| 67 |
+
json={"model": "openai/gpt-oss-20b", "messages": messages,
|
| 68 |
"max_tokens": 2048, "temperature": 0.15, "top_p": 0.9},
|
| 69 |
timeout=settings.provider_timeout_seconds
|
| 70 |
)
|