Spaces:
Runtime error
Runtime error
namberino commited on
Commit ·
2089701
1
Parent(s): d9fcf95
Update openrouter provider
Browse files
utils.py
CHANGED
|
@@ -48,7 +48,7 @@ def text_safety_check(text: str, sleep_seconds: float = 0.5):
|
|
| 48 |
return max_conf, max_category
|
| 49 |
|
| 50 |
def _post_chat(messages: list, model: str, temperature: float = 0.2, timeout: int = 60) -> str:
|
| 51 |
-
payload = {"model": model, "messages": messages, "temperature": temperature, "provider": {"only": ["Cerebras"]}}
|
| 52 |
resp = requests.post(API_URL, headers=HEADERS, json=payload, timeout=timeout)
|
| 53 |
resp.raise_for_status()
|
| 54 |
data = resp.json()
|
|
|
|
| 48 |
return max_conf, max_category
|
| 49 |
|
| 50 |
def _post_chat(messages: list, model: str, temperature: float = 0.2, timeout: int = 60) -> str:
|
| 51 |
+
payload = {"model": model, "messages": messages, "temperature": temperature, "provider": {"only": ["Cerebras", "together", "baseten", "deepinfra/fp4"]}}
|
| 52 |
resp = requests.post(API_URL, headers=HEADERS, json=payload, timeout=timeout)
|
| 53 |
resp.raise_for_status()
|
| 54 |
data = resp.json()
|