From 147f09aa2e7f1359400f21aa5cda79f7563023c8 Mon Sep 17 00:00:00 2001 From: Duggempudi-BC <138879239+Duggempudi-BC@users.noreply.github.com> Date: Wed, 11 Oct 2023 03:12:38 +0530 Subject: [PATCH] made changes in function_agent.py file (#124) Co-authored-by: THEAVINASHREDDY Co-authored-by: Dominic <34897716+shroominic@users.noreply.github.com> --- codeinterpreterapi/agents/functions_agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: