mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-21 15:36:48 +00:00
feat: rename 'model' to 'model_name'
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user