Spaces:
Sleeping
Sleeping
Manus AI commited on
Commit ·
b660f2d
1
Parent(s): d75c09c
Fix: Explicitly use Featherless AI provider for abliterated models via HF Router
Browse files- server/_core/llm.ts +4 -1
server/_core/llm.ts
CHANGED
|
@@ -216,7 +216,7 @@ const resolveApiUrl = (model: string) => {
|
|
| 216 |
return `${ENV.forgeApiUrl.replace(/\/$/, "")}/v1/chat/completions`;
|
| 217 |
}
|
| 218 |
|
| 219 |
-
//
|
| 220 |
return "https://router.huggingface.co/v1/chat/completions";
|
| 221 |
};
|
| 222 |
|
|
@@ -327,6 +327,9 @@ export async function invokeLLM(params: InvokeParams): Promise<InvokeResult> {
|
|
| 327 |
headers: {
|
| 328 |
"content-type": "application/json",
|
| 329 |
authorization: `Bearer ${apiKey}`,
|
|
|
|
|
|
|
|
|
|
| 330 |
},
|
| 331 |
body: JSON.stringify(payload),
|
| 332 |
});
|
|
|
|
| 216 |
return `${ENV.forgeApiUrl.replace(/\/$/, "")}/v1/chat/completions`;
|
| 217 |
}
|
| 218 |
|
| 219 |
+
// Use the Hugging Face Router endpoint to leverage external providers
|
| 220 |
return "https://router.huggingface.co/v1/chat/completions";
|
| 221 |
};
|
| 222 |
|
|
|
|
| 327 |
headers: {
|
| 328 |
"content-type": "application/json",
|
| 329 |
authorization: `Bearer ${apiKey}`,
|
| 330 |
+
"x-use-cache": "false",
|
| 331 |
+
"x-wait-for-model": "true",
|
| 332 |
+
"x-inference-provider": "featherless",
|
| 333 |
},
|
| 334 |
body: JSON.stringify(payload),
|
| 335 |
});
|