Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Oct 10, 2023
2 parents dfda8b7 + 147f09a commit 9dd2e82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codeinterpreterapi/agents/functions_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9dd2e82

Please sign in to comment.