Complete conditional infinity import TODO

- add logging
- change declaration order
This commit is contained in:
TerminalMan
2024-08-31 21:48:43 +01:00
committed by GitHub
parent 21712578cf
commit 43104e0d19

View File

@@ -7,13 +7,13 @@ from typing import List, Optional
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: