Files
deer-flow/frontend/src/core/api/api-client.ts
T
2026-01-19 21:51:40 +08:00

14 lines
343 B
TypeScript

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