mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-07 16:19:09 +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>;
|
defaultHeaders?: Record<string, string>;
|
||||||
includeApiKey?: boolean;
|
includeApiKey?: boolean;
|
||||||
}) {
|
}) {
|
||||||
if (!process.env.LANGGRAPH_API_URL) {
|
if (!process.env.PORT) {
|
||||||
throw new Error("LANGGRAPH_API_URL not found");
|
throw new Error("PORT environment variable not found");
|
||||||
}
|
}
|
||||||
if (options?.includeApiKey && !process.env.LANGGRAPH_API_KEY) {
|
if (options?.includeApiKey && !process.env.LANGGRAPH_API_KEY) {
|
||||||
throw new Error("LANGGRAPH_API_KEY not found");
|
throw new Error("LANGGRAPH_API_KEY not found");
|
||||||
|
|
@ -14,7 +14,7 @@ export function createLangGraphClient(options?: {
|
||||||
...(options?.includeApiKey && {
|
...(options?.includeApiKey && {
|
||||||
apiKey: process.env.LANGGRAPH_API_KEY,
|
apiKey: process.env.LANGGRAPH_API_KEY,
|
||||||
}),
|
}),
|
||||||
apiUrl: process.env.LANGGRAPH_API_URL,
|
apiUrl: `http://localhost:${process.env.PORT}`,
|
||||||
defaultHeaders: options?.defaultHeaders,
|
defaultHeaders: options?.defaultHeaders,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue