The root cause of this error is that the initialize_tools method in the Swarms class is passing an instance of OpenAI to the load_qa_with_sources_chain function, which then passes it to the LLMChain constructor. The LLMChain constructor expects a dictionary for the llm parameter, but it's receiving an instance of OpenAI instead.

NewTools
Kye 2 years ago
parent 08852720dd
commit 4f79c604e8

@ -13,7 +13,8 @@ class Swarms:
# Initialize language model
return llm_class(openai_api_key=self.openai_api_key)
def initialize_tools(self, llm):
def initialize_tools(self, llm_class):
llm = self.initialize_llm(llm_class)
# Initialize tools
web_search = DuckDuckGoSearchRun()
tools = [

Loading…
Cancel
Save