diff --git a/pyproject.toml b/pyproject.toml index 48b4e58..04f0247 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ crewai = {extras = ["tools"], version = "^0.108.0"} rich = "^13.9.4" weave = "^0.51.39" mlflow = "^2.21.1" +ollama = "^0.4.0" poetry = "^2.1.1" [tool.poetry.group.dev] diff --git a/src/structsense/app.py b/src/structsense/app.py index 6e98609..a090a87 100644 --- a/src/structsense/app.py +++ b/src/structsense/app.py @@ -830,7 +830,7 @@ async def align_structured_information(self, extracted_result): print(extracted_result) logger.info("Starting alignment process") - + start_time_align = time.time() # Detect task type task_type = self._detect_task_type() logger.info(f"Detected task type for alignment: {task_type}") @@ -891,6 +891,8 @@ async def align_structured_information(self, extracted_result): # Update shared state with the correct structure self._update_shared_state("aligned_terms", wrapped_result) logger.info(f"Alignment complete with aligned data") + end_time_align = time.time() + logger.info(f"Alignment process completed in {end_time_align - start_time_align:.2f} seconds") return wrapped_result else: logger.warning("Alignment crew returned no results") @@ -904,6 +906,7 @@ async def judge_alignment(self, aligned_info): return None logger.info("Starting judgment of aligned information") + start_time_judge = time.time() # Detect task type task_type = self._detect_task_type() @@ -945,6 +948,8 @@ async def judge_alignment(self, aligned_info): self._update_shared_state("judged_terms", wrapped_result) logger.info(f"Judgment complete with judged data") + end_time_judge = time.time() + logger.info(f"Judgment process completed in {end_time_judge - start_time_judge:.2f} seconds") return wrapped_result @listen(judge_alignment)