mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 11:33:14 +00:00
* feat: New multi agent GitHub based workflow * fix: read plan from gh issue in init issue node * format * cr * fix how new planner threads are started, allow for creating new issues * fix: read tasks from gh issue inside manager when taking any action * cr * update planner * feat: port intrerrupt node to planner * add interrupt routing in graph * update programmer nodes and state * read messages from issue in programmer * lint fix * tag issue when opening PR * better pr title and body generation prompts * start runs from planner interrupt and update issue with task plan * fix lg server build issues * cr * fix cloning and pushing * cr * cr * feat: v0 copy (#194) * feat: v0 copy * cr * all pages 'working' * cr * cr * cr * cr
20 lines
602 B
TypeScript
20 lines
602 B
TypeScript
import { Client } from "@langchain/langgraph-sdk";
|
|
|
|
export function createLangGraphClient(options?: {
|
|
defaultHeaders?: Record<string, string>;
|
|
includeApiKey?: boolean;
|
|
}) {
|
|
if (!process.env.LANGGRAPH_API_URL) {
|
|
throw new Error("LANGGRAPH_API_URL not found");
|
|
}
|
|
if (options?.includeApiKey && !process.env.LANGGRAPH_API_KEY) {
|
|
throw new Error("LANGGRAPH_API_KEY not found");
|
|
}
|
|
return new Client({
|
|
...(options?.includeApiKey && {
|
|
apiKey: process.env.LANGGRAPH_API_KEY,
|
|
}),
|
|
apiUrl: process.env.LANGGRAPH_API_URL,
|
|
defaultHeaders: options?.defaultHeaders,
|
|
});
|
|
}
|