diff --git a/ai_ta_backend/main.py b/ai_ta_backend/main.py index 69cd246f..ef311b6c 100644 --- a/ai_ta_backend/main.py +++ b/ai_ta_backend/main.py @@ -101,7 +101,6 @@ def getTopContexts(service: RetrievalService) -> Response: Exception Testing how exceptions are handled. """ - print("In getRopContexts in Main()") search_query: str = request.args.get('search_query', default='', type=str) course_name: str = request.args.get('course_name', default='', type=str) token_limit: int = request.args.get('token_limit', default=3000, type=int) diff --git a/ai_ta_backend/service/retrieval_service.py b/ai_ta_backend/service/retrieval_service.py index e51123f5..91583323 100644 --- a/ai_ta_backend/service/retrieval_service.py +++ b/ai_ta_backend/service/retrieval_service.py @@ -97,7 +97,7 @@ def getTopContexts(self, search_query: str, course_name: str, token_limit: int = return [] self.posthog.capture( - event_name="success_get_top_contexts_OG", + event_name="getTopContexts_success_DI", properties={ "user_query": search_query, "course_name": course_name, @@ -204,7 +204,7 @@ def getTopContextsWithMQR(self, 4. [CANCELED BEC POINTLESS] Rank the docs based on the relevance score. 5. Parent-doc-retrieval: Pad just the top 5 docs with expanded context from the original document. """ - return 'fail' + raise NotImplementedError("Method deprecated for performance reasons. Hope to bring back soon.") # try: # top_n_per_query = 40 # HARD CODE TO ENSURE WE HIT THE MAX TOKENS @@ -334,7 +334,6 @@ def vector_search(self, search_query, course_name): top_n = 80 # EMBED openai_start_time = time.monotonic() - print("OPENAI_API_TYPE", os.environ['OPENAI_API_TYPE']) user_query_embedding = self.embeddings.embed_query(search_query) openai_embedding_latency = time.monotonic() - openai_start_time