bugfixing #1
This commit is contained in:
parent
afd28d934e
commit
2a6c56ed23
12 changed files with 300 additions and 269 deletions
|
|
@ -1,10 +1,18 @@
|
|||
import { LLM_CONFIG } from "../config/llm.js";
|
||||
|
||||
/**
|
||||
* Pings the local llama.cpp server to ensure it's up, running, and has a model loaded.
|
||||
* If the server is offline or still loading, it terminates the pipeline gracefully.
|
||||
* Skipped entirely when using a cloud provider.
|
||||
*/
|
||||
export async function checkLlmServer(
|
||||
url = "http://127.0.0.1:8080/health",
|
||||
): Promise<void> {
|
||||
if (LLM_CONFIG.provider !== "local") {
|
||||
console.log("🌐 Using cloud provider — skipping local health check.");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch(url);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue