mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 17:05:41 +01:00
Fix mypy
This commit is contained in:
parent
34d48d7b4d
commit
63d3b9f936
7 changed files with 39 additions and 23 deletions
|
|
@ -32,7 +32,7 @@ class LLMComponent:
|
|||
match settings.llm.mode:
|
||||
case "local":
|
||||
try:
|
||||
from llama_index.llms.llama_cpp import LlamaCPP
|
||||
from llama_index.llms.llama_cpp import LlamaCPP # type: ignore
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"Local dependencies not found, install with `poetry install --extras local`"
|
||||
|
|
@ -70,7 +70,7 @@ class LLMComponent:
|
|||
)
|
||||
case "openai":
|
||||
try:
|
||||
from llama_index.llms.openai import OpenAI
|
||||
from llama_index.llms.openai import OpenAI # type: ignore
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"OpenAI dependencies not found, install with `poetry install --extras openai`"
|
||||
|
|
@ -84,7 +84,7 @@ class LLMComponent:
|
|||
)
|
||||
case "openailike":
|
||||
try:
|
||||
from llama_index.llms.openai_like import OpenAILike
|
||||
from llama_index.llms.openai_like import OpenAILike # type: ignore
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"OpenAILike dependencies not found, install with `poetry install --extras openailike`"
|
||||
|
|
@ -101,7 +101,7 @@ class LLMComponent:
|
|||
)
|
||||
case "ollama":
|
||||
try:
|
||||
from llama_index.llms.ollama import Ollama
|
||||
from llama_index.llms.ollama import Ollama # type: ignore
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"Ollama dependencies not found, install with `poetry install --extras ollama`"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue