aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app/api
diff options
context:
space:
mode:
authorDhravya Shah <[email protected]>2024-07-22 22:44:18 -0500
committerDhravya Shah <[email protected]>2024-07-22 22:44:18 -0500
commitcf1eeb86c34c92afd973defcada9841f87eeffa0 (patch)
treebc2ce3f6516ef76c117f9ed6b6b0f258acb79047 /apps/web/app/api
parentMerge pull request #133 from aryasaatvik/lockfile (diff)
downloadsupermemory-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.ts3
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}`,