You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/langchain/agents/agent.py:166, in BaseSingleActionAgent.save(self, file_path)
163 directory_path.mkdir(parents=True, exist_ok=True)
165 # Fetch dictionary to save
--> 166 agent_dict = self.dict()
168 if save_path.suffix == ".json":
169 with open(file_path, "w") as f:
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/langchain/agents/agent.py:137, in BaseSingleActionAgent.dict(self, **kwargs)
135 """Return dictionary representation of agent."""
136 _dict = super().dict()
--> 137 _type = self._agent_type
138 if isinstance(_type, AgentType):
139 _dict["_type"] = str(_type.value)
NotImplementedError Traceback (most recent call last)
Cell In[6], line 1
----> 1 agent.save_agent("file_name.yaml")
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/langchain/agents/agent.py:733, in AgentExecutor.save_agent(self, file_path)
731 def save_agent(self, file_path: Union[Path, str]) -> None:
732 """Save the underlying agent."""
--> 733 return self.agent.save(file_path)
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/langchain/agents/agent.py:166, in BaseSingleActionAgent.save(self, file_path)
163 directory_path.mkdir(parents=True, exist_ok=True)
165 # Fetch dictionary to save
--> 166 agent_dict = self.dict()
168 if save_path.suffix == ".json":
169 with open(file_path, "w") as f:
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/langchain/agents/agent.py:137, in BaseSingleActionAgent.dict(self, **kwargs)
135 """Return dictionary representation of agent."""
136 _dict = super().dict()
--> 137 _type = self._agent_type
138 if isinstance(_type, AgentType):
139 _dict["_type"] = str(_type.value)
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/langchain/agents/agent.py:132, in BaseSingleActionAgent._agent_type(self)
129 @Property
130 def _agent_type(self) -> str:
131 """Return Identifier of agent type."""
--> 132 raise NotImplementedError
NotImplementedError:
The text was updated successfully, but these errors were encountered: