eliza
eliza copied to clipboard
feat: improve GOAT integration by allowing tool calling when using generateText
Relates to:
https://x.com/sunosuporno/status/1870967395780792741
Risks
Low
Background
What does this PR do?
Two main things:
- Update
generateText
API to be able to pass through tool options to leverage the model's tool calling capabilities - Update the GOAT plugin to use tool calling allowing it to perform complex onchain actions that require multiple steps. Now developers can define high level actions (swap, bet on Polymarket, stake, etc.) and GOAT will take care of handling each action (see the screenshots below)
What kind of change is this?
Improvements (misc. changes to existing features)
Documentation changes needed?
I have updated the documentation accordingly.
Testing
Detailed testing steps
- Clone the repo and build it
- Set up the
EVM_PRIVATE_KEY
andEVM_PROVIDER_URL
env variables - Uncomment lines 70-72 in the
actions.ts
file in the GOAT plugin - Prompt the agent with "Swap 0.1 USDC for MODE using KIM in a single hop"
- In the agent logs you should see all the different steps that the agent is making
- The tx should fail unless you have ETH and USDC in MODE :)
Screenshots
Before
Agent can just do one function call so you need to specify the inputs like this:
After
Agent can do multiple function calls in an action so inputs are more human friendly:
In the background you can also log all the different tool interactions:
Discord username
aguspunk