diff --git a/codeinterpreterapi/agents/functions_agent.py b/codeinterpreterapi/agents/functions_agent.py index ad96ccda..9902c4ee 100644 --- a/codeinterpreterapi/agents/functions_agent.py +++ b/codeinterpreterapi/agents/functions_agent.py @@ -128,13 +128,13 @@ def get_allowed_tools(self) -> List[str]: """Get allowed tools.""" return list([t.name for t in self.tools]) - @root_validator + @root_validator(allow_reuse=True) def validate_llm(cls, values: dict) -> dict: if not isinstance(values["llm"], ChatOpenAI): raise ValueError("Only supported with ChatOpenAI models.") return values - @root_validator + @root_validator(allow_reuse=True) def validate_prompt(cls, values: dict) -> dict: prompt: BasePromptTemplate = values["prompt"] if "agent_scratchpad" not in prompt.input_variables: