diff options
| author | Dhravya Shah <[email protected]> | 2024-07-22 22:44:18 -0500 |
|---|---|---|
| committer | Dhravya Shah <[email protected]> | 2024-07-22 22:44:18 -0500 |
| commit | cf1eeb86c34c92afd973defcada9841f87eeffa0 (patch) | |
| tree | bc2ce3f6516ef76c117f9ed6b6b0f258acb79047 /apps/web/app/api | |
| parent | Merge pull request #133 from aryasaatvik/lockfile (diff) | |
| download | supermemory-cf1eeb86c34c92afd973defcada9841f87eeffa0.tar.xz supermemory-cf1eeb86c34c92afd973defcada9841f87eeffa0.zip | |
added ability to use pro mode, to do complex timeseries/location searches
Diffstat (limited to 'apps/web/app/api')
| -rw-r--r-- | apps/web/app/api/chat/route.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/web/app/api/chat/route.ts b/apps/web/app/api/chat/route.ts index 004bfd3b..3b8d971b 100644 --- a/apps/web/app/api/chat/route.ts +++ b/apps/web/app/api/chat/route.ts @@ -27,6 +27,7 @@ export async function POST(req: NextRequest) { const spaces = url.searchParams.get("spaces"); const sourcesOnly = url.searchParams.get("sourcesOnly") ?? "false"; + const proMode = url.searchParams.get("proMode") === "true"; const jsonRequest = (await req.json()) as { chatHistory: ChatHistory[]; @@ -55,7 +56,7 @@ export async function POST(req: NextRequest) { const modelCompatible = await convertChatHistoryList(validated.data); const resp = await fetch( - `${process.env.BACKEND_BASE_URL}/api/chat?query=${query}&user=${session.user.id}&sourcesOnly=${sourcesOnly}&spaces=${spaces}`, + `${process.env.BACKEND_BASE_URL}/api/chat?query=${query}&user=${session.user.id}&sourcesOnly=${sourcesOnly}&spaces=${spaces}&proMode=${proMode}`, { headers: { Authorization: `Bearer ${process.env.BACKEND_SECURITY_KEY}`, |