Skip to content

Commit

Permalink
prompting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nerfZael committed Apr 15, 2024
1 parent 48fb4bb commit 2c1ad49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions autotx/agents/SendTokensAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
Your job is to only prepare the transactions by calling the prepare_transfer_transaction tool and the user will take care of executing them.
NOTE: There is no reason to call get_token_balance after calling prepare_transfer_transaction as the transfers are only prepared and not executed.
Do not just respond with JSON, instead call the tools with the correct arguments.
Take extra care in the order of transactions to prepare.
"""
)

Expand Down
10 changes: 6 additions & 4 deletions autotx/agents/SwapTokensAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
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.
Below are examples, NOTE these are only examples and in practice you need to call the prepare_swap_transaction tool with the correct arguments.
Example 1:
User: Send 0.1 ETH to vitalik.eth and then sell 5 ETH and buy USDC
Advisor reworded: Send 0.1 ETH to vitalik.eth and then buy USDC with 5 ETH from address {autotx.manager.address}
User: Send 0.1 ETH to vitalik.eth and then swap ETH to 5 USDC
Advisor reworded: Send 0.1 ETH to vitalik.eth and then buy USDC with 0.1 ETH from address {autotx.manager.address}
...
Other agent messages
...
Call prepare_swap_transaction with args:
{{
"token_to_sell": "5 ETH",
"token_to_buy": "USDC"
"token_to_sell": "ETH",
"token_to_buy": "5 USDC"
}}
Example 2:
Expand Down Expand Up @@ -65,6 +65,8 @@
"token_to_buy": "6 UNI"
}}
Above are examples, NOTE these are only examples and in practice you need to call the prepare_swap_transaction tool with the correct arguments.
Take extra care in ensuring you have to right amount next to the token symbol.
Listen to the user more than the advisor!
Only call tools, do not respond with JSON.
"""
)
Expand Down

0 comments on commit 2c1ad49

Please sign in to comment.