From 2d0df40c728abfd7c1d5258f494463ae9535caa4 Mon Sep 17 00:00:00 2001 From: Sebastian Loose Date: Mon, 11 Nov 2024 17:15:35 +0100 Subject: [PATCH] Remove console prints --- app/llm/request_handler/basic_request_handler.py | 2 -- app/pipeline/chat/lecture_chat_pipeline.py | 1 - app/retrieval/lecture_retrieval.py | 4 ---- app/web/status/status_update.py | 1 - 4 files changed, 8 deletions(-) diff --git a/app/llm/request_handler/basic_request_handler.py b/app/llm/request_handler/basic_request_handler.py index 5392bd75..1342a71c 100644 --- a/app/llm/request_handler/basic_request_handler.py +++ b/app/llm/request_handler/basic_request_handler.py @@ -14,7 +14,6 @@ class BasicRequestHandler(RequestHandler): def __init__(self, model_id: str): self.model_id = model_id self.llm_manager = LlmManager() - print("llm manager" + str(self.llm_manager.entries)) def complete( self, @@ -33,5 +32,4 @@ def chat( def embed(self, text: str) -> list[float]: llm = self.llm_manager.get_llm_by_id(self.model_id) - print("llm uiuiu" + str(llm)) return llm.embed(text) diff --git a/app/pipeline/chat/lecture_chat_pipeline.py b/app/pipeline/chat/lecture_chat_pipeline.py index 5baebcdb..26768f49 100644 --- a/app/pipeline/chat/lecture_chat_pipeline.py +++ b/app/pipeline/chat/lecture_chat_pipeline.py @@ -119,7 +119,6 @@ def __call__(self, dto: LectureChatPipelineExecutionDTO): prompt_val = self.prompt.format_messages() self.prompt = ChatPromptTemplate.from_messages(prompt_val) try: - # self.callback.in_progress() response = (self.prompt | self.pipeline).invoke({}) self._append_tokens(self.llm.tokens, PipelineEnum.IRIS_CHAT_LECTURE_MESSAGE) response_with_citation = self.citation_pipeline( diff --git a/app/retrieval/lecture_retrieval.py b/app/retrieval/lecture_retrieval.py index 17ef723a..7bcd8ce0 100644 --- a/app/retrieval/lecture_retrieval.py +++ b/app/retrieval/lecture_retrieval.py @@ -512,10 +512,6 @@ def fetch_course_language(self, course_id): """ course_language = "english" - print(self.collection) - print(self.llm_embedding) - print(self.collection.query) - if course_id: # Fetch the first object that matches the course ID with the language property result = self.collection.query.fetch_objects( diff --git a/app/web/status/status_update.py b/app/web/status/status_update.py index d47a59df..266dfd40 100644 --- a/app/web/status/status_update.py +++ b/app/web/status/status_update.py @@ -57,7 +57,6 @@ def __init__( def on_status_update(self): """Send a status update to the Artemis API.""" try: - print(self.url) print(self.status.dict(by_alias=True)) requests.post( self.url,