mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 09:13:14 +00:00
fix: Get proper langgraph api url from PORT env var in agent (#217)
This commit is contained in:
parent
ff8a0f7167
commit
ac9f6a3986
1 changed files with 3 additions and 3 deletions
|
|
@ -4,8 +4,8 @@ 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 (!process.env.PORT) {
|
||||
throw new Error("PORT environment variable not found");
|
||||
}
|
||||
if (options?.includeApiKey && !process.env.LANGGRAPH_API_KEY) {
|
||||
throw new Error("LANGGRAPH_API_KEY not found");
|
||||
|
|
@ -14,7 +14,7 @@ export function createLangGraphClient(options?: {
|
|||
...(options?.includeApiKey && {
|
||||
apiKey: process.env.LANGGRAPH_API_KEY,
|
||||
}),
|
||||
apiUrl: process.env.LANGGRAPH_API_URL,
|
||||
apiUrl: `http://localhost:${process.env.PORT}`,
|
||||
defaultHeaders: options?.defaultHeaders,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue