From 43104e0d19c1978ec642f4e502c02ce536635f45 Mon Sep 17 00:00:00 2001 From: TerminalMan <84923604+SecretiveShell@users.noreply.github.com> Date: Sat, 31 Aug 2024 21:48:43 +0100 Subject: [PATCH] Complete conditional infinity import TODO - add logging - change declaration order --- backends/infinity/model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/infinity/model.py b/backends/infinity/model.py index 35a4df45..37049016 100644 --- a/backends/infinity/model.py +++ b/backends/infinity/model.py @@ -7,13 +7,13 @@ from common.utils import unwrap # Conditionally import infinity to sidestep its logger -# TODO: Make this prettier +has_infinity_emb: bool = False try: from infinity_emb import EngineArgs, AsyncEmbeddingEngine - has_infinity_emb = True + logger.debug("Successfully imported infinity.") except ImportError: - has_infinity_emb = False + logger.debug("Failed to import infinity.") class InfinityContainer: