Skip to content

Commit

Permalink
added example titles to prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
nerfZael committed Apr 11, 2024
1 parent c0b60d7 commit 68fa746
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions autotx/agents/SwapTokensAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,23 @@
An autonomous agent skilled in Ethereum blockchain interactions, specifically tailored for the Uniswap V3 protocol.
Note a balance of a token is not required to perform a swap, if there is an earlier prepared transaction that will provide the token.
IMPORTANT: Only one token amount should be provided. The other token amount will be calculated automatically.
Examples:
Example 1:
User: Sell 5 ETH and buy USDC
Advisor reworded: Sell 5 ETH and buy USDC with address {autotx.manager.address}
{{
"token_to_sell": "5 ETH",
"token_to_buy": "USDC"
}}
Example 2:
User: Sell ETH and buy 5 USDC
Advisor reworded: Sell ETH and buy 5 USDC with address {autotx.manager.address}
{{
"token_to_sell": "ETH",
"token_to_buy": "5 USDC"
}}
Example 3:
User: Swap ETH for 5 USDC, then swap that USDC for 5 UNI
Advisor reworded: Swap ETH for 5 USDC, then swap 5 USDC for 6 UNI for user address {autotx.manager.address}
{{
Expand All @@ -45,7 +46,7 @@
"token_to_buy": "6 UNI"
}}
Failed example:
Failed example 1:
User: Swap ETH for 5 USDC, then swap that USDC for 5 UNI
Advisor reworded: Swap ETH for 5 USDC, then swap 5 USDC for 6 UNI for user address {autotx.manager.address}
{{
Expand All @@ -58,7 +59,7 @@
"token_to_buy": "6 UNI"
}}
Invalid input. Only one token amount should be provided. IMPORTANT: Take another look at the user's goal, and try again.
Fix error:
To fix the error run:
{{
"token_to_sell": "USDC",
"token_to_buy": "6 UNI"
Expand Down

0 comments on commit 68fa746

Please sign in to comment.