Skip to content

Commit

Permalink
made changes in function_agent.py file (#124)
Browse files Browse the repository at this point in the history
Co-authored-by: THEAVINASHREDDY <[email protected]>
Co-authored-by: Dominic <[email protected]>
  • Loading branch information
3 people authored Oct 10, 2023
1 parent c7e242f commit 147f09a
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 147f09a

Please sign in to comment.