At the top of dsrag/llm.py we can find this:
import google.generativeai as genai
The correct approach should be to have it use dsrag.utils.imports.LazyLoader as the rest of the code does.
The current version seems like a mistake and forces everybody to install that dependency even though we might not need it.
There already appears to be some LazyLoaders in dsrag/utils/imports.py for google, but it just isn't being used in llm.py:
genai = LazyLoader("google.generativeai", "google-generativeai")
genai_new = LazyLoader("google.genai", "google-genai")
At the top of dsrag/llm.py we can find this:
The correct approach should be to have it use dsrag.utils.imports.LazyLoader as the rest of the code does.
The current version seems like a mistake and forces everybody to install that dependency even though we might not need it.
There already appears to be some LazyLoaders in dsrag/utils/imports.py for google, but it just isn't being used in llm.py: