Combines OpenGradient's verifiable inference and advanced ML tools with LangChain.
- The agent's tools are defined in
tools.py - The agent's prompts and instructions are in
prompts.py - The agent itself is defined (using the tools and prompts) in
agent.py - The main function for executing the agent is in
main.py
The agent is equipped by the following tools:
- Wikipedia search tool for looking up articles
- OpenGradient AlphaSense tool for Sui price prediction.
- Dependencies are defined in
requirements.txt, runpip install -r requirements.txtto install all dependencies. We recommend using virtualenv. - You'll need an OpenGradient token in order to run inferences. You can use the
opengradientCLI to create it, read more on our official docs. - Make a copy of the
.env.sh.templatefile in the root folder and rename to.env.sh. Fill in with your OpenGradient token as well as Twitter API keys.
Note: If you run into git permission denied error messages, please generate a Github SSH key.
ssh-keygen -t ed25519 -C "your_email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
Then proceed to add the output of the below command to your Github SSH keys in the settings page.
cat ~/.ssh/id_ed25519.pub
To execute the agent, simply run python main.py <your-instruction-here>. For example, python main.py "what is the size of NYC"
Next, you can add new tools, prompts, user input etc to customize the agent's behaviour.