Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,7 +67,7 @@ body {
|
|
| 67 |
|
| 68 |
# Model client (consider switching to a public model like mistralai if 401 persists)
|
| 69 |
client = InferenceClient(
|
| 70 |
-
base_url="https://router.huggingface.co/
|
| 71 |
|
| 72 |
)
|
| 73 |
|
|
@@ -102,7 +102,7 @@ def respond(message, history, user_level, max_tokens, temperature, top_p):
|
|
| 102 |
|
| 103 |
response = ""
|
| 104 |
try:
|
| 105 |
-
for msg in client.
|
| 106 |
messages,
|
| 107 |
max_tokens=max_tokens,
|
| 108 |
stream=True,
|
|
|
|
| 67 |
|
| 68 |
# Model client (consider switching to a public model like mistralai if 401 persists)
|
| 69 |
client = InferenceClient(
|
| 70 |
+
base_url="https://router.huggingface.co/v1",
|
| 71 |
|
| 72 |
)
|
| 73 |
|
|
|
|
| 102 |
|
| 103 |
response = ""
|
| 104 |
try:
|
| 105 |
+
for msg in client.chat.completions.create(
|
| 106 |
messages,
|
| 107 |
max_tokens=max_tokens,
|
| 108 |
stream=True,
|