feat: fix dataset retrieve agent llm not support error (#656)
This commit is contained in:
parent
ae7c0380dc
commit
ba3dc8cae0
3 changed files with 12 additions and 2 deletions
|
|
@ -73,7 +73,6 @@ class MultiDatasetRouterAgent(OpenAIFunctionsAgent):
|
|||
),
|
||||
**kwargs: Any,
|
||||
) -> BaseSingleActionAgent:
|
||||
llm.model_name = 'gpt-3.5-turbo'
|
||||
return super().from_llm_and_tools(
|
||||
llm=llm,
|
||||
tools=tools,
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class AgentConfiguration(BaseModel):
|
|||
llm: BaseLanguageModel
|
||||
tools: list[BaseTool]
|
||||
summary_llm: BaseLanguageModel
|
||||
dataset_llm: BaseLanguageModel
|
||||
memory: Optional[BaseChatMemory] = None
|
||||
callbacks: Callbacks = None
|
||||
max_iterations: int = 6
|
||||
|
|
@ -84,7 +85,7 @@ class AgentExecutor:
|
|||
elif self.configuration.strategy == PlanningStrategy.ROUTER:
|
||||
self.configuration.tools = [t for t in self.configuration.tools if isinstance(t, DatasetRetrieverTool)]
|
||||
agent = MultiDatasetRouterAgent.from_llm_and_tools(
|
||||
llm=self.configuration.llm,
|
||||
llm=self.configuration.dataset_llm,
|
||||
tools=self.configuration.tools,
|
||||
extra_prompt_messages=self.configuration.memory.buffer if self.configuration.memory else None,
|
||||
verbose=True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue