feat: support NEXT_PUBLIC_LANGGRAPH_BASE_URL

This commit is contained in:
Henry Li
2026-01-19 21:51:40 +08:00
parent d6c1e5868d
commit fb265f2b1f
3 changed files with 12 additions and 2 deletions

View File

@@ -2,12 +2,12 @@
import { Client as LangGraphClient } from "@langchain/langgraph-sdk/client";
import { getBackendBaseURL } from "../config";
import { getLangGraphBaseURL } from "../config";
let _singleton: LangGraphClient | null = null;
export function getAPIClient(): LangGraphClient {
_singleton ??= new LangGraphClient({
apiUrl: getBackendBaseURL(),
apiUrl: getLangGraphBaseURL(),
});
return _singleton;
}