Skip to content

Commit b4677e0

Browse files
perf: Remove unnecessary dependencies
1 parent 9b7c12f commit b4677e0

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

backend/apps/chat/schemas/chat_base_schema.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from abc import ABC, abstractmethod
44
from langchain_core.language_models import BaseLLM as LangchainBaseLLM
55
from langchain_openai import ChatOpenAI
6-
from langchain_community.llms import Tongyi, VLLM
6+
# from langchain_community.llms import Tongyi, VLLM
77

88
class LLMConfig(BaseModel):
99
"""Base configuration class for large language models"""
@@ -43,7 +43,7 @@ def _init_llm(self) -> LangchainBaseLLM:
4343
def generate(self, prompt: str) -> str:
4444
return self.llm.invoke(prompt)
4545

46-
class TongyiLLM(BaseLLM):
46+
""" class TongyiLLM(BaseLLM):
4747
def _init_llm(self) -> LangchainBaseLLM:
4848
return Tongyi(
4949
model_name=self.config.model_name,
@@ -62,16 +62,16 @@ def _init_llm(self) -> LangchainBaseLLM:
6262
)
6363
6464
def generate(self, prompt: str) -> str:
65-
return self.llm.invoke(prompt)
65+
return self.llm.invoke(prompt) """
6666

6767

6868
class LLMFactory:
6969
"""Large Language Model Factory Class"""
7070

7171
_llm_types: Dict[str, Type[BaseLLM]] = {
7272
"openai": OpenAILLM,
73-
"tongyi": TongyiLLM,
74-
"vllm": VLLMLLM
73+
"tongyi": OpenAILLM,
74+
"vllm": OpenAILLM
7575
}
7676

7777
@classmethod

backend/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ dependencies = [
2424
"langchain-openai>=0.3,<0.4",
2525
"langchain-community>=0.3,<0.4",
2626
"langgraph>=0.3,<0.4",
27-
"vllm>=0.8.5",
2827
"dashscope>=1.14.0,<2.0.0",
2928
"pymysql (>=1.1.1,<2.0.0)",
3029
"cryptography (>=44.0.3,<45.0.0)",

0 commit comments

Comments
 (0)