mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 20:12:55 +01:00
Fix mypy
This commit is contained in:
parent
34d48d7b4d
commit
63d3b9f936
7 changed files with 39 additions and 23 deletions
|
|
@ -20,7 +20,9 @@ class EmbeddingComponent:
|
|||
match embedding_mode:
|
||||
case "local":
|
||||
try:
|
||||
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
|
||||
from llama_index.embeddings.huggingface import ( # type: ignore
|
||||
HuggingFaceEmbedding,
|
||||
)
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"Local dependencies not found, install with `poetry install --extras local`"
|
||||
|
|
@ -45,7 +47,9 @@ class EmbeddingComponent:
|
|||
)
|
||||
case "openai":
|
||||
try:
|
||||
from llama_index.embeddings.openai import OpenAIEmbedding
|
||||
from llama_index.embeddings.openai import ( # type: ignore
|
||||
OpenAIEmbedding,
|
||||
)
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"OpenAI dependencies not found, install with `poetry install --extras openai`"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue