feat: rename 'model' to 'model_name'

This commit is contained in:
Henry Li
2026-01-16 14:03:34 +08:00
parent 1f03fb3749
commit faf80bb429
10 changed files with 147 additions and 89 deletions
+17
View File
@@ -0,0 +1,17 @@
"use client";
import { Client as LangGraphClient } from "@langchain/langgraph-sdk/client";
let _singleton: LangGraphClient | null = null;
export function getAPIClient(): LangGraphClient {
let url: URL | null = null;
if (typeof window === "undefined") {
url = new URL("/api/langgraph", "http://localhost:3000");
} else {
url = new URL("/api/langgraph", window.location.origin);
}
_singleton ??= new LangGraphClient({
apiUrl: "http://localhost:2024",
});
return _singleton;
}