Eliminate tenacity from dynamic import
Browse files- lightrag/llm/azure_openai.py +0 -2
- lightrag/llm/bedrock.py +0 -2
- lightrag/llm/hf.py +0 -4
- lightrag/llm/lmdeploy.py +0 -2
- lightrag/llm/ollama.py +0 -3
lightrag/llm/azure_openai.py
CHANGED
@@ -4,8 +4,6 @@ import pipmaster as pm # Pipmaster for dynamic library install
|
|
4 |
# install specific modules
|
5 |
if not pm.is_installed("openai"):
|
6 |
pm.install("openai")
|
7 |
-
if not pm.is_installed("tenacity"):
|
8 |
-
pm.install("tenacity")
|
9 |
|
10 |
from openai import (
|
11 |
AsyncAzureOpenAI,
|
|
|
4 |
# install specific modules
|
5 |
if not pm.is_installed("openai"):
|
6 |
pm.install("openai")
|
|
|
|
|
7 |
|
8 |
from openai import (
|
9 |
AsyncAzureOpenAI,
|
lightrag/llm/bedrock.py
CHANGED
@@ -6,8 +6,6 @@ import pipmaster as pm # Pipmaster for dynamic library install
|
|
6 |
|
7 |
if not pm.is_installed("aioboto3"):
|
8 |
pm.install("aioboto3")
|
9 |
-
if not pm.is_installed("tenacity"):
|
10 |
-
pm.install("tenacity")
|
11 |
import aioboto3
|
12 |
import numpy as np
|
13 |
from tenacity import (
|
|
|
6 |
|
7 |
if not pm.is_installed("aioboto3"):
|
8 |
pm.install("aioboto3")
|
|
|
|
|
9 |
import aioboto3
|
10 |
import numpy as np
|
11 |
from tenacity import (
|
lightrag/llm/hf.py
CHANGED
@@ -9,12 +9,8 @@ if not pm.is_installed("transformers"):
|
|
9 |
pm.install("transformers")
|
10 |
if not pm.is_installed("torch"):
|
11 |
pm.install("torch")
|
12 |
-
if not pm.is_installed("tenacity"):
|
13 |
-
pm.install("tenacity")
|
14 |
if not pm.is_installed("numpy"):
|
15 |
pm.install("numpy")
|
16 |
-
if not pm.is_installed("tenacity"):
|
17 |
-
pm.install("tenacity")
|
18 |
|
19 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
20 |
from tenacity import (
|
|
|
9 |
pm.install("transformers")
|
10 |
if not pm.is_installed("torch"):
|
11 |
pm.install("torch")
|
|
|
|
|
12 |
if not pm.is_installed("numpy"):
|
13 |
pm.install("numpy")
|
|
|
|
|
14 |
|
15 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
16 |
from tenacity import (
|
lightrag/llm/lmdeploy.py
CHANGED
@@ -3,8 +3,6 @@ import pipmaster as pm # Pipmaster for dynamic library install
|
|
3 |
# install specific modules
|
4 |
if not pm.is_installed("lmdeploy"):
|
5 |
pm.install("lmdeploy[all]")
|
6 |
-
if not pm.is_installed("tenacity"):
|
7 |
-
pm.install("tenacity")
|
8 |
|
9 |
from lightrag.exceptions import (
|
10 |
APIConnectionError,
|
|
|
3 |
# install specific modules
|
4 |
if not pm.is_installed("lmdeploy"):
|
5 |
pm.install("lmdeploy[all]")
|
|
|
|
|
6 |
|
7 |
from lightrag.exceptions import (
|
8 |
APIConnectionError,
|
lightrag/llm/ollama.py
CHANGED
@@ -10,9 +10,6 @@ import pipmaster as pm # Pipmaster for dynamic library install
|
|
10 |
# install specific modules
|
11 |
if not pm.is_installed("ollama"):
|
12 |
pm.install("ollama")
|
13 |
-
if not pm.is_installed("tenacity"):
|
14 |
-
pm.install("tenacity")
|
15 |
-
|
16 |
|
17 |
import ollama
|
18 |
|
|
|
10 |
# install specific modules
|
11 |
if not pm.is_installed("ollama"):
|
12 |
pm.install("ollama")
|
|
|
|
|
|
|
13 |
|
14 |
import ollama
|
15 |
|