open-swe/apps/web/src/app/api/[..._path]/route.ts

12 lines
697 B
TypeScript
Raw Normal View History

2025-05-28 12:26:47 -07:00
import { initApiPassthrough } from "langgraph-nextjs-api-passthrough";
// This file acts as a proxy for requests to your LangGraph server.
// Read the [Going to Production](https://github.com/langchain-ai/agent-chat-ui?tab=readme-ov-file#going-to-production) section for more information.
export const { GET, POST, PUT, PATCH, DELETE, OPTIONS, runtime } =
initApiPassthrough({
apiUrl: process.env.LANGGRAPH_API_URL ?? "remove-me", // default, if not defined it will attempt to read process.env.LANGGRAPH_API_URL
apiKey: process.env.LANGSMITH_API_KEY ?? "remove-me", // default, if not defined it will attempt to read process.env.LANGSMITH_API_KEY
runtime: "edge", // default
});