Skip to content

Commit

Permalink
Fixed import error for AutoGPT e.g. from langchain.experimental.auton… (
Browse files Browse the repository at this point in the history
#5101)

`from langchain.experimental.autonomous_agents.autogpt.agent import
AutoGPT` results in an import error as AutoGPT is not defined in the
__init__.py file

https://python.langchain.com/en/latest/use_cases/autonomous_agents/marathon_times.html

An Alternate, way would be to be directly update the import statement to
be `from langchain.experimental import AutoGPT`

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
  • Loading branch information
ankitarya1019 and dev2049 authored May 22, 2023
1 parent 467ca6f commit 5b2b436
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion langchain/experimental/autonomous_agents/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from langchain.experimental.autonomous_agents.autogpt.agent import AutoGPT
from langchain.experimental.autonomous_agents.baby_agi.baby_agi import BabyAGI

__all__ = ["BabyAGI"]
__all__ = ["BabyAGI", "AutoGPT"]

0 comments on commit 5b2b436

Please sign in to comment.