Skip to content

Commit b317fd7

Browse files
committed
update langchain search wrapper use
1 parent 32bd3e6 commit b317fd7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

muagent/chat/search_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from langchain.chains.llm import LLMChain
55
from langchain.callbacks import AsyncIteratorCallbackHandler
6-
from langchain.utilities import BingSearchAPIWrapper, DuckDuckGoSearchAPIWrapper
6+
from langchain_community.utilities import BingSearchAPIWrapper, DuckDuckGoSearchAPIWrapper
77
from langchain.prompts.chat import ChatPromptTemplate
88
from langchain_community.docstore.document import Document
99

muagent/llm_models/openai_model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,14 @@ def __init__(self, llm_config: LLMConfig, callBack: AsyncIteratorCallbackHandler
113113

114114

115115
def getChatModelFromConfig(llm_config: LLMConfig, callBack: AsyncIteratorCallbackHandler = None, ) -> Union[ChatOpenAI, LLM, CustomLLMModel]:
116+
# logger.debug(f"{llm_config}")
116117
if llm_config and llm_config.llm and isinstance(llm_config.llm, LLM):
117118
return CustomLLMModel(llm=llm_config.llm)
118119
elif llm_config:
119120
model_class_dict = {"openai": OpenAILLMModel, "lingyiwanwu": LYWWLLMModel}
120121
model_class = model_class_dict[llm_config.model_engine]
121122
model = model_class(llm_config, callBack)
123+
# logger.debug(f"{model.llm}")
122124
return model
123125
else:
124126
return OpenAILLMModel(llm_config, callBack)

0 commit comments

Comments
 (0)