File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 33from abc import ABC , abstractmethod
44from langchain_core .language_models import BaseLLM as LangchainBaseLLM
55from langchain_openai import ChatOpenAI
6- from langchain_community .llms import Tongyi , VLLM
6+ # from langchain_community.llms import Tongyi, VLLM
77
88class 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
6868class 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
Original file line number Diff line number Diff 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)" ,
You can’t perform that action at this time.
0 commit comments