Skip to content

ReAct agent with access to Python REPL to execute simple workflows. Uses OpenAI GPT-family as language model.

License

Notifications You must be signed in to change notification settings

peterroelants/gpt_react_repl_w_method_search

Repository files navigation

ReAct REPL Agent

Large-language model based "agent" that can can execute small tasks by using a Python REPL and pre-implemented methods. The "agent loop" is based on ReAct.

The agent can look up methods using a method_search() method that uses semantic search on the indexed Python methods. Methods are indexed using OpenAI embedding of their signatures and descriptions.

More details in the blogpost at https://peterroelants.github.io/posts/react-repl-agent/

Run yourself

There are 2 notebooks to run the agent:

Environment

A conda/mamba environment is provided at env/.

Certain libraries (such as the openai library) need a secret key to use them. These should be added to the secrets/ directory.

Contribute

If you want to contribute, please do so via pull requests.

Tools

To run all code formatting and linters before pushing a commit run:

./tools/run_all.sh

About

ReAct agent with access to Python REPL to execute simple workflows. Uses OpenAI GPT-family as language model.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published