From b38200a463559cbe75b4408471f85c2d92141675 Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Fri, 21 Jun 2024 12:19:10 -0700 Subject: [PATCH] Re-enable full context search, remove dummy contexts --- src/pages/api/getContexts.ts | 51 ++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/src/pages/api/getContexts.ts b/src/pages/api/getContexts.ts index cfe477869..d569cbeca 100644 --- a/src/pages/api/getContexts.ts +++ b/src/pages/api/getContexts.ts @@ -18,31 +18,32 @@ export const fetchContexts = async ( doc_groups: doc_groups, } - const dummyContexts: ContextWithMetadata[] = [ - { - id: 1, - text: 'This is a dummy context', - readable_filename: 'dummy_filename_1.pdf', - course_name: 'dummy course 1', - 'course_name ': 'dummy course 1', - s3_path: 'dummy_s3_path_1', - pagenumber: '1', - url: 'dummy_url_1', - base_url: 'dummy_base_url_1', - }, - { - id: 2, - text: 'This is another dummy context', - readable_filename: 'dummy_filename_2.pdf', - course_name: 'dummy course 2', - 'course_name ': 'dummy course 2', - s3_path: 'dummy_s3_path_2', - pagenumber: '2', - url: 'dummy_url_2', - base_url: 'dummy_base_url_2', - }, - ] - return dummyContexts + // UESFUL FOR TESTING -- SHORTEN CONTEXTS + // const dummyContexts: ContextWithMetadata[] = [ + // { + // id: 1, + // text: 'This is a dummy context', + // readable_filename: 'dummy_filename_1.pdf', + // course_name: 'dummy course 1', + // 'course_name ': 'dummy course 1', + // s3_path: 'dummy_s3_path_1', + // pagenumber: '1', + // url: 'dummy_url_1', + // base_url: 'dummy_base_url_1', + // }, + // { + // id: 2, + // text: 'This is another dummy context', + // readable_filename: 'dummy_filename_2.pdf', + // course_name: 'dummy course 2', + // 'course_name ': 'dummy course 2', + // s3_path: 'dummy_s3_path_2', + // pagenumber: '2', + // url: 'dummy_url_2', + // base_url: 'dummy_base_url_2', + // }, + // ] + // return dummyContexts const url = `https://flask-production-751b.up.railway.app/getTopContexts`