swallow exceptions in load_slow_imports

This commit is contained in:
Paul Gauthier 2024-07-04 11:21:57 -03:00
parent 4da8541c1b
commit 5f6ed30e11

View file

@ -556,10 +556,13 @@ def load_slow_imports():
# improve startup time. # improve startup time.
# This func is called in a thread to load them in the background # This func is called in a thread to load them in the background
# while we wait for the user to type their first message. # while we wait for the user to type their first message.
import httpx # noqa: F401 try:
import litellm # noqa: F401 import httpx # noqa: F401
import networkx # noqa: F401 import litellm # noqa: F401
import numpy # noqa: F401 import networkx # noqa: F401
import numpy # noqa: F401
except Exception:
pass
if __name__ == "__main__": if __name__ == "__main__":