mech-client 0.14.1__tar.gz → 0.15.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. {mech_client-0.14.1 → mech_client-0.15.1}/PKG-INFO +278 -224
  2. {mech_client-0.14.1 → mech_client-0.15.1}/README.md +273 -218
  3. mech_client-0.15.1/mech_client/__init__.py +3 -0
  4. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/cli.py +258 -11
  5. mech_client-0.15.1/mech_client/configs/mechs.json +116 -0
  6. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/interact.py +6 -1
  7. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/marketplace_interact.py +160 -42
  8. mech_client-0.15.1/mech_client/safe.py +73 -0
  9. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/subgraph.py +0 -11
  10. {mech_client-0.14.1 → mech_client-0.15.1}/pyproject.toml +6 -8
  11. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/deposit_native.py +48 -16
  12. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/deposit_token.py +107 -31
  13. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscribe.py +14 -6
  14. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/contracts/base_contract.py +9 -1
  15. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/contracts/nft_sales.py +1 -3
  16. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/contracts/subscription_provider.py +2 -4
  17. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/contracts/token.py +23 -5
  18. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/manager.py +109 -16
  19. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/utils.py +2 -2
  20. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/whitelist.py +5 -1
  21. mech_client-0.14.1/mech_client/__init__.py +0 -3
  22. mech_client-0.14.1/mech_client/configs/mechs.json +0 -116
  23. mech_client-0.14.1/mech_client/helpers/acn/README.md +0 -76
  24. mech_client-0.14.1/mech_client/helpers/acn/__init__.py +0 -30
  25. mech_client-0.14.1/mech_client/helpers/acn/acn.proto +0 -71
  26. mech_client-0.14.1/mech_client/helpers/acn/acn_pb2.py +0 -42
  27. mech_client-0.14.1/mech_client/helpers/acn/custom_types.py +0 -224
  28. mech_client-0.14.1/mech_client/helpers/acn/dialogues.py +0 -126
  29. mech_client-0.14.1/mech_client/helpers/acn/message.py +0 -274
  30. mech_client-0.14.1/mech_client/helpers/acn/protocol.yaml +0 -24
  31. mech_client-0.14.1/mech_client/helpers/acn/serialization.py +0 -149
  32. mech_client-0.14.1/mech_client/helpers/acn/tests/__init__.py +0 -20
  33. mech_client-0.14.1/mech_client/helpers/acn/tests/test_acn.py +0 -256
  34. mech_client-0.14.1/mech_client/helpers/acn/tests/test_acn_dialogues.py +0 -53
  35. mech_client-0.14.1/mech_client/helpers/acn/tests/test_acn_messages.py +0 -117
  36. mech_client-0.14.1/mech_client/helpers/acn_data_share/README.md +0 -32
  37. mech_client-0.14.1/mech_client/helpers/acn_data_share/__init__.py +0 -32
  38. mech_client-0.14.1/mech_client/helpers/acn_data_share/acn_data_share.proto +0 -17
  39. mech_client-0.14.1/mech_client/helpers/acn_data_share/acn_data_share_pb2.py +0 -29
  40. mech_client-0.14.1/mech_client/helpers/acn_data_share/dialogues.py +0 -115
  41. mech_client-0.14.1/mech_client/helpers/acn_data_share/message.py +0 -213
  42. mech_client-0.14.1/mech_client/helpers/acn_data_share/protocol.yaml +0 -21
  43. mech_client-0.14.1/mech_client/helpers/acn_data_share/serialization.py +0 -111
  44. mech_client-0.14.1/mech_client/helpers/acn_data_share/tests/test_acn_data_share_dialogues.py +0 -49
  45. mech_client-0.14.1/mech_client/helpers/acn_data_share/tests/test_acn_data_share_messages.py +0 -53
  46. mech_client-0.14.1/mech_client/helpers/p2p_libp2p_client/README.md +0 -15
  47. mech_client-0.14.1/mech_client/helpers/p2p_libp2p_client/__init__.py +0 -21
  48. mech_client-0.14.1/mech_client/helpers/p2p_libp2p_client/connection.py +0 -703
  49. mech_client-0.14.1/mech_client/helpers/p2p_libp2p_client/connection.yaml +0 -52
  50. {mech_client-0.14.1 → mech_client-0.15.1}/LICENSE +0 -0
  51. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/AgentMech.json +0 -0
  52. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/AgentRegistry.json +0 -0
  53. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/AgreementStoreManager.base.json +0 -0
  54. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/AgreementStoreManager.gnosis.json +0 -0
  55. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/BalanceTrackerFixedPriceNative.json +0 -0
  56. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/BalanceTrackerFixedPriceToken.json +0 -0
  57. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/BalanceTrackerNvmSubscriptionNative.json +0 -0
  58. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/BalanceTrackerNvmSubscriptionToken.json +0 -0
  59. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/ComplementaryServiceMetadata.json +0 -0
  60. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/DIDRegistry.base.json +0 -0
  61. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/DIDRegistry.gnosis.json +0 -0
  62. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/EscrowPaymentCondition.base.json +0 -0
  63. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/EscrowPaymentCondition.gnosis.json +0 -0
  64. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/IERC1155.json +0 -0
  65. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/IMech.json +0 -0
  66. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/IToken.json +0 -0
  67. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/LockPaymentCondition.base.json +0 -0
  68. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/LockPaymentCondition.gnosis.json +0 -0
  69. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/MechMarketplace.json +0 -0
  70. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/NFTSalesTemplate.base.json +0 -0
  71. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/NFTSalesTemplate.gnosis.json +0 -0
  72. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/NeverminedConfig.base.json +0 -0
  73. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/NeverminedConfig.gnosis.json +0 -0
  74. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/SubscriptionNFT.base.json +0 -0
  75. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/SubscriptionNFT.gnosis.json +0 -0
  76. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/SubscriptionProvider.base.json +0 -0
  77. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/SubscriptionProvider.gnosis.json +0 -0
  78. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/SubscriptionToken.base.json +0 -0
  79. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/TransferNFTCondition.base.json +0 -0
  80. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/abis/TransferNFTCondition.gnosis.json +0 -0
  81. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/acn.py +0 -0
  82. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/delivery.py +0 -0
  83. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/fetch_ipfs_hash.py +0 -0
  84. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/helpers/__init__.py +0 -0
  85. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/mech_marketplace_subgraph.py +0 -0
  86. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/mech_marketplace_tool_management.py +0 -0
  87. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/mech_tool_management.py +0 -0
  88. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/prompt_to_ipfs.py +0 -0
  89. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/push_to_ipfs.py +0 -0
  90. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/to_png.py +0 -0
  91. {mech_client-0.14.1 → mech_client-0.15.1}/mech_client/wss.py +0 -0
  92. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/__init__.py +0 -0
  93. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/benchmark.sh +0 -0
  94. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/bump.py +0 -0
  95. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/contracts/agreement_manager.py +0 -0
  96. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/contracts/did_registry.py +0 -0
  97. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/contracts/escrow_payment.py +0 -0
  98. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/contracts/lock_payment.py +0 -0
  99. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/contracts/nft.py +0 -0
  100. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/contracts/transfer_nft.py +0 -0
  101. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/envs/base.env +0 -0
  102. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/envs/gnosis.env +0 -0
  103. {mech_client-0.14.1 → mech_client-0.15.1}/scripts/nvm_subscription/resources/networks.json +0 -0
@@ -1,21 +1,20 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mech-client
3
- Version: 0.14.1
3
+ Version: 0.15.1
4
4
  Summary: Basic client to interact with a mech
5
5
  License: Apache-2.0
6
6
  Author: David Minarsch
7
7
  Author-email: david.minarsch@googlemail.com
8
- Requires-Python: >=3.10,<4.0
8
+ Requires-Python: >=3.10,<3.12
9
9
  Classifier: License :: OSI Approved :: Apache Software License
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Requires-Dist: asn1crypto (>=1.4.0,<1.5.0)
14
+ Requires-Dist: click (==8.1.8)
14
15
  Requires-Dist: gql (>=3.4.1)
15
- Requires-Dist: open-aea-cli-ipfs (>=1.53.0,<2.0.0)
16
- Requires-Dist: open-aea-ledger-cosmos (>=1.53.0,<2.0.0)
17
- Requires-Dist: open-aea-ledger-ethereum (>=1.53.0,<2.0.0)
18
- Requires-Dist: open-aea[cli] (>=1.53.0,<2.0.0)
16
+ Requires-Dist: olas-operate-middleware (==0.14.7)
17
+ Requires-Dist: safe-eth-py (>=7.18.0,<8.0.0)
19
18
  Requires-Dist: setuptools (>=77.0.3,<78.0.0)
20
19
  Requires-Dist: tabulate (>=0.9.0,<0.10.0)
21
20
  Requires-Dist: websocket-client (>=0.32.0,<1)
@@ -38,6 +37,10 @@ The easiest way to create, run, deploy and test your own Mech and Mech tools is
38
37
 
39
38
  Only continue reading this README if you know what you are doing and you are specifically interested in this repo.
40
39
 
40
+ ## Quickstart Guide
41
+ For a fast and straightforward setup, follow the instructions provided on the website [here](https://build.olas.network/hire).
42
+ This guide will walk you through the essential steps to get up and running without requiring an in-depth understanding of the system.
43
+
41
44
  ## Installation
42
45
 
43
46
  Find the latest available release on [PyPi](https://pypi.org/project/mech-client/#description).
@@ -73,141 +76,109 @@ Usage: mechx [OPTIONS] COMMAND [ARGS]...
73
76
  Command-line tool for interacting with mechs.
74
77
 
75
78
  Options:
76
- --version Show the version and exit.
77
- --help Show this message and exit.
79
+ --version Show the version and exit.
80
+ --client-mode Enables client mode
81
+ --help Show this message and exit.
78
82
 
79
83
  Commands:
80
- interact Interact with a mech specifying a prompt and tool.
81
- prompt-to-ipfs Upload a prompt and tool to IPFS as metadata.
82
- push-to-ipfs Upload a file to IPFS.
83
- to-png Convert a stability AI API's diffusion model output.
84
- tools-for-agents List tools available for all agents or a specific agent.
85
- tool-description Get the description of a specific tool.
86
- tool_io_schema Get the input/output schema of a specific tool.
87
-
88
- ```
89
-
90
- ### Set up the EOA and private key
91
-
92
- To use the Mech Client you need an EOA account and its associated private key stored in a text file `ethereum_private_key.txt`. You can set it up in two ways:
93
-
94
- - Use any software of your choice (e.g., [Metamask](https://metamask.io/)) and copy the private key:
84
+ deposit-native Deposits Native balance for prepaid marketplace requests
85
+ deposit-token Deposits Token balance for prepaid marketplace requests
86
+ fetch-mm-mechs-info Fetches info of marketplace mechs
87
+ interact Interact with a mech specifying a prompt and tool
88
+ prompt-to-ipfs Upload a prompt and tool to IPFS as metadata
89
+ purchase-nvm-subscription Allows to purchase Nevermined subscription
90
+ push-to-ipfs Upload a file to IPFS
91
+ setup-agent-mode Sets up the agent mode for users
92
+ to-png Convert a stability AI API's diffusion model output
93
+ tool-description Get the description of a specific tool (legacy mechs)
94
+ tool-description-for-marketplace-mech Get the description of a specific tool (marketplace mechs)
95
+ tool-io-schema Get the input/output schema of a specific tool (legacy mechs)
96
+ tool-io-schema-for-marketplace-mech Get the input/output schema of a specific tool (marketplace mechs)
97
+ tools-for-agents List tools available for all agents or a specific agent (legacy mechs)
98
+ tools-for-marketplace-mech List tools available for marketplace mechs
95
99
 
96
- ```bash
97
- echo -n YOUR_PRIVATE_KEY > ethereum_private_key.txt
98
- ```
99
-
100
- Do not include any leading or trailing spaces, tabs or newlines, or any other character in the file `ethereum_private_key.txt`.
100
+ ```
101
101
 
102
- - Alternatively, use the Open AEA command `generate-key` (you'll need to install [Open AEA](https://pypi.org/project/open-aea/) and its [Ethereum ledger plugin](https://pypi.org/project/open-aea-ledger-ethereum/)):
102
+ ## Mech Marketplace
103
103
 
104
- ```bash
105
- aea generate-key ethereum
106
- ```
104
+ Learn more about mech marketplace [here](https://olas.network/mech-marketplace)
107
105
 
108
- and display the corresponding EOA:
106
+ ### Set up agent mode for on-chain interactions
109
107
 
110
- ```bash
111
- python -c "from web3 import Web3; print(Web3().eth.account.from_key(open('ethereum_private_key.txt').read()).address)"
112
- ```
108
+ There are two modes you can use the mechx for on-chain interactions. Currently `agent-mode` is only supported for gnosis and base network.
113
109
 
114
- The EOA you use must have enough funds to pay for the Mech requests, or alternatively, use a Nevermined subscription.
110
+ - _agent mode_ (Recommended): This allows to register your on-chain interactions as agent on the olas protocol and allows for A2A activity to be reflected on the client
111
+ - _client mode_: Simple on-chain interations using EOA
115
112
 
116
- > **:warning: Warning** <br />
117
- > * **If the generated EOA account is for development purposes, make sure it does not contain large amounts of funds.**
118
- >
119
- > * **If you store the key file in a local Git repository, we recommend that you add it to `.gitignore` in order to avoid publishing it unintentionally:**
120
- >
121
- > ```bash
122
- > echo ethereum_private_key.txt >> .gitignore
123
- > ```
124
-
125
- ### API Keys
126
-
127
- In order to fetch on-chain data for Gnosis and Base, mech client requires an API key from a blockchain data provider. You can find them here for [GnosisScan](https://gnosisscan.io/) and [BaseScan](https://basescan.org/). Follow these steps to generate your API key if you are planning to use mech client for gnosis and base:
128
-
129
- 1. Sign up or log in
130
- 2. Go to API Dashboard on the left menu
131
- 3. Add a new API key
132
- 4. Once generated copy your API key
113
+ ```bash
114
+ cp .example.env .env
115
+ ```
133
116
 
134
- Once you have your API key, you'll need to configure it in your environment. Use the following command to set it for your environment.
117
+ 📝 For better reliability, it is recommended to use a stable third-party RPC provider.
135
118
 
136
119
  ```bash
137
- export MECHX_API_KEY=<your api key>
120
+ mechx setup-agent-mode --chain-config <chain_config>
138
121
  ```
139
122
 
140
- ### Generate Mech requests
123
+ ⚠️ Note: Run `setup-agent-mode` for each chain you interact with, and ensure your `.env` file has the correct RPC endpoint.
141
124
 
142
- #### Select the mech you are going to send requests to
125
+ ### Generate Mech requests
143
126
 
144
- Mechs can receive requests via the [Mech Marketplace](https://github.com/valory-xyz/ai-registry-mech/) or directly. We call the last ones _Legacy Mechs_.
145
- Mechs are deployed on several networks. Find the list of supported networks and corresponding mech addresses [here](https://github.com/valory-xyz/mech?tab=readme-ov-file#examples-of-deployed-mechs). Additionally, you can find more available Mechs [here](https://mech.olas.network/) (click on the tab "Legacy Mech" in order to see Legacy Mech (available only on Gnosis) and "Mech Marketplace" for the ones which receive requests via the Mech Marketplace).
127
+ #### List marketplace mechs
146
128
 
147
- #### Legacy Mechs
148
-
149
- The basic usage of the Mech Client is as follows:
129
+ To list the top marketplace mechs based on deliveries, use the `fetch-mm-mechs-info` command. You can specify the chain you want to query. Please note that only the first 20 mechs sorted by number of deliveries will be shown.
130
+ Currently supported chains are gnosis and base
150
131
 
151
132
  ```bash
152
- mechx interact --prompts <prompt> --tools <tool> --agent_id <agent_id>
133
+ mechx fetch-mm-mechs-info --chain-config gnosis
153
134
  ```
154
135
 
155
- where agent blueprint with `<agent_id>` will process `<prompt>` with the `<tool>` and default options. Each chain has its own set of Mech agents. You can find the agent blueprint IDs for each chain on the [Mech Hub](https://aimechs.autonolas.network/registry) or on the [Mech repository](https://github.com/valory-xyz/mech?tab=readme-ov-file#examples-of-deployed-mechs).
136
+ ```bash
137
+ +--------------+--------------------+--------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------+
138
+ | AI agent Id | Mech Type | Mech Address | Total Deliveries | Metadata Link |
139
+ +==============+====================+============================================+====================+===============================================================================================================+
140
+ | 2182 | Fixed Price Native | 0xc05e7412439bd7e91730a6880e18d5d5873f632c | 41246 | https://gateway.autonolas.tech/ipfs/f01701220157d3b106831e2713b86af1b52af76a3ef28c52ae0853e9638180902ebee41d4 |
141
+ +--------------+--------------------+--------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------+
142
+ | 2235 | Fixed Price Native | 0xb3c6319962484602b00d5587e965946890b82101 | 10127 | https://gateway.autonolas.tech/ipfs/f01701220157d3b106831e2713b86af1b52af76a3ef28c52ae0853e9638180902ebee41d4 |
143
+ +--------------+--------------------+--------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------+
144
+ | 2198 | Fixed Price Native | 0x601024e27f1c67b28209e24272ced8a31fc8151f | 5714 | https://gateway.autonolas.tech/ipfs/f01701220157d3b106831e2713b86af1b52af76a3ef28c52ae0853e9638180902ebee41d4 |
145
+ +--------------+--------------------+--------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------+
146
+ | 1722 | Fixed Price Token | 0x13f36b1a516290b7563b1de574a02ebeb48926a1 | 399 | https://gateway.autonolas.tech/ipfs/f01701220157d3b106831e2713b86af1b52af76a3ef28c52ae0853e9638180902ebee41d4 |
147
+ +--------------+--------------------+--------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------+
148
+ | 2135 | Fixed Price Native | 0xbead38e4c4777341bb3fd44e8cd4d1ba1a7ad9d7 | 353 | https://gateway.autonolas.tech/ipfs/f01701220157d3b106831e2713b86af1b52af76a3ef28c52ae0853e9638180902ebee41d4 |
149
+ +--------------+--------------------+--------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------+
150
+ ```
156
151
 
157
- ⚠️ Batch requests and tools are not supported for legacy mechs
152
+ You can also find more available Mechs [here](https://mech.olas.network/)
158
153
 
159
- Some useful options:
154
+ #### Usage
160
155
 
161
- - `--key <private_key_path>`: Specifies the path of the private key. The default value is `./ethereum_private_key.txt`.
162
- - `--tools <name>`: Name of the tool to process the prompt. If you are aware about the tools that are provided by an agent you can directly provide its name using this option. If not provided, it will show a list of available tools for the agent so that you can select which one you want to use:
163
-
164
- ```text
165
- Select prompting tool
166
- |--------------------------------------------------|
167
- | ID | Tool |
168
- |--------------------------------------------------|
169
- | 0 | openai-text-davinci-002 |
170
- | ...| ... |
171
- |--------------------------------------------------|
172
- Tool ID >
173
- ```
174
-
175
- - `--chain-config <name>`: Use default chain configuration parameters (RPC, WSS, ...). [See below](#chain-configuration) for more details. Available values are
176
- - `arbitrum`
177
- - `base`
178
- - `celo`
179
- - `gnosis` (Default)
180
- - `optimism`
181
- - `polygon`
182
-
183
- - `--confirm <type>`: Specify how to wait for the result of your request:
184
- - `off-chain`: Wait for the result using the ACN.
185
- - `on-chain`: Wait for the result using the Subgraph and the Websocket subscription (whichever arrives first).
186
- - `wait-for-both` (Default): Wait for the result using both `off-chain` and `on-chain` (whichever arrives first).
156
+ The basic usage of the Mech Client is as follows.
187
157
 
188
- ##### Example
158
+ ```bash
159
+ mechx interact --prompts <prompt> --priority-mech <priority mech address> --tools openai-gpt-3.5-turbo --chain-config <chain_config>
160
+ ```
189
161
 
190
- Example of a request specifying a key file and tool:
162
+ The Mech Client can also be used to send batch requests. There are couple of different ways to achieve this:
191
163
 
192
164
  ```bash
193
- mechx interact --prompts "write a short poem" --agent_id 6 --key ~/ethereum_private_key.txt --tools openai-gpt-3.5-turbo --chain-config gnosis --confirm on-chain
165
+ mechx interact --prompts={<prompt-1>,<prompt-2>} --priority-mech <priority mech address> --tools={<tool-1>,<tool-2>} --chain-config <chain_config>
194
166
  ```
195
167
 
196
- You will see an output like this:
168
+ or <br>
197
169
 
198
170
  ```bash
199
- Chain configuration: gnosis
200
- Prompt uploaded: https://gateway.autonolas.tech/ipfs/f01701220af9e4e8b4bd62d76394064f493081917bcc0b9c34a4aff60f82623b717617279
201
- Transaction sent: https://gnosisscan.io/tx/0x61359f9cc6a1debb07d34ce1038f6aa30d25257c17edeb2b161741805e43e8d0
202
- Waiting for transaction receipt...
203
- Created on-chain request with ID 100407405856633966395081711430940962809568685031934329025999216833965518452765
204
- Data arrived: https://gateway.autonolas.tech/ipfs/f01701220a462120d5bb03f406fa5ef3573df77184a20ab6343d7bade76bd321654aa7251
205
- Data from agent: {'requestId': 100407405856633966395081711430940962809568685031934329025999216833965518452765, 'result': "In a world of chaos and strife,\nThere's beauty in the simplest of life.\nA gentle breeze whispers through the trees,\nAnd birds sing melodies with ease.\n\nThe sun sets in a fiery hue,\nPainting the sky in shades of blue.\nStars twinkle in the darkness above,\nGuiding us with their light and love.\n\nSo take a moment to pause and see,\nThe wonders of this world so free.\nEmbrace the joy that each day brings,\nAnd let your heart soar on gentle wings.", 'prompt': 'write a short poem', 'cost_dict': {}, 'metadata': {'model': None, 'tool': 'openai-gpt-3.5-turbo'}}
171
+ mechx interact --prompts <prompt-1> --prompts <prompt-2> --priority-mech <priority mech address> --tools <tool-1> --tools <tool-2> --chain-config <chain_config>
206
172
  ```
207
173
 
208
- #### With the Mech Marketplace
174
+ Additionally other options are available and their usage is listed below:
175
+
176
+ `--use-prepaid <bool>`: use the prepaid method to send requests to a Mech via the Mech Marketplace. Defaults to False. <br>
177
+ `--use-offchain <bool>`: use the off-chain method to send requests to a Mech via the Mech Marketplace. Defaults to False.
178
+
179
+ ##### Prepaid Requests
209
180
 
210
- With the Mech Marketplace, in order to pay for the Mech fees, you can make a deposit before sending requests. The deposit depends on the
181
+ In order to pay for the Mech fees, you can make a deposit before sending requests. The deposit depends on the
211
182
  payment model of the Mech. For a fixed price Mech receiving payments in native token, use the following:
212
183
 
213
184
  ```bash
@@ -227,75 +198,232 @@ mechx purchase-nvm-subscription --chain-config <chain_config>
227
198
  ```
228
199
 
229
200
  ⚠️ To ensure optimal performance and reliability when using `purchase-nvm-subscription`, it is advisable to use a custom RPC provider as public RPC endpoints may be rate-limited or unreliable under high usage. You can configure your custom RPC URL in your environment variables using
201
+
230
202
  ```bash
231
203
  export MECHX_CHAIN_RPC=
232
204
  ```
233
205
 
234
- You can use the option `--key <private_key_file_path>` in order to customize the path to the private key file.
206
+ ##### Offchain Requests
235
207
 
236
- The basic usage of the Mech Client is then as follows.
208
+ To use offchain requests using `--use-offchain` flag, export the `MECHX_MECH_OFFCHAIN_URL` env variable before sending requests. For example if you want to connect to a mech running locally, you can do the following
237
209
 
238
210
  ```bash
239
- mechx interact --prompts <prompt> --priority-mech <priority mech address> --tools openai-gpt-3.5-turbo --chain-config <chain_config>
211
+ export MECHX_MECH_OFFCHAIN_URL="http://localhost:8000/"
240
212
  ```
241
213
 
242
- Additionally to other options which are the same as for legacy Mechs, this usage has the following option:
214
+ If you want to use a Valory mech for offchain requests, below is the list of mechs and their address and offchain urls.
215
+
216
+ | AI agent ID | Priority Mech Address | Offchain URL |
217
+ | :---------: | :----------------------------------------: | :---------------------------------------------------: |
218
+ | 2182 | 0xB3C6319962484602b00d5587e965946890b82101 | https://d19715222af5b940.agent.propel.autonolas.tech/ |
219
+
220
+ ### List tools available for a mech
221
+
222
+ To list the tools available for a specific marketplace mech, use the `tools-for-marketplace-mech` command. You can specify an AI agent ID to get tools for a specific mech.
243
223
 
244
- `--use-prepaid <bool>`: use the prepaid method to send requests to a Mech via the Mech Marketplace. Defaults to False. <br>
245
- `--use-offchain <bool>`: use the off-chain method to send requests to a Mech via the Mech Marketplace. Defaults to False.
246
- > To use offchain requests using `--use-offchain` flag, export the `MECHX_MECH_OFFCHAIN_URL` env variable before sending requests. For example if you want to connect to a mech running locally, you can do the following
247
224
  ```bash
248
- export MECHX_MECH_OFFCHAIN_URL="http://localhost:8000/"
225
+ mechx tools-for-marketplace-mech 1722 --chain-config gnosis
249
226
  ```
250
- If you want to use a Valory mech for offchain requests, below is the list of mechs and their address and offchain urls.
251
227
 
252
- | AI agent ID | Priority Mech Address | Offchain URL |
253
- | :---: | :---: | :---: |
254
- | 2182 | 0xB3C6319962484602b00d5587e965946890b82101 | https://d19715222af5b940.agent.propel.autonolas.tech/ |
228
+ ```bash
229
+ You will see an output like this:
230
+ +---------------------------------------------+-----------------------------------------------+
231
+ | Tool Name | Unique Identifier |
232
+ +=============================================+===============================================+
233
+ | claude-prediction-offline | 1722-claude-prediction-offline |
234
+ +---------------------------------------------+-----------------------------------------------+
235
+ | claude-prediction-online | 1722-claude-prediction-online |
236
+ +---------------------------------------------+-----------------------------------------------+
237
+ | deepmind-optimization | 1722-deepmind-optimization |
238
+ +---------------------------------------------+-----------------------------------------------+
239
+ ```
255
240
 
241
+ ### Get Tool Description
256
242
 
257
- The Mech Client can also be used to send batch requests. There are couple of different ways to achieve this:
243
+ To get the description of a specific tool, use the ` tool-description-for-marketplace-mech` command. You need to specify the unique identifier of the tool.
258
244
 
259
245
  ```bash
260
- mechx interact --prompts={<prompt-1>,<prompt-2>} --priority-mech <priority mech address> --tools={<tool-1>,<tool-2>} --chain-config <chain_config>
246
+ mechx tool-description-for-marketplace-mech <unique_identifier> --chain-config <chain_config>
261
247
  ```
262
248
 
263
- or <br>
249
+ Example usage:
264
250
 
265
251
  ```bash
266
- mechx interact --prompts <prompt-1> --prompts <prompt-2> --priority-mech <priority mech address> --tools <tool-1> --tools <tool-2> --chain-config <chain_config>
252
+ mechx tool-description-for-marketplace-mech 1722-openai-gpt-4 --chain-config gnosis
267
253
  ```
268
254
 
269
- ### List marketplace mechs
270
- To list the top marketplace mechs based on deliveries, use the `fetch-mm-mechs-info` command. You can specify the chain you want to query. Please note that only the first 20 mechs sorted by number of deliveries will be shown.
271
- Currently supported chains are gnosis and base
255
+ You will see an output like this:
256
+
272
257
  ```bash
273
- mechx fetch-mm-mechs-info --chain-config gnosis
258
+ Description for tool 1722-openai-gpt-4: Performs a request to OpenAI's GPT-4 model.
274
259
  ```
260
+
261
+ ### Get Tool Input/Output Schema
262
+
263
+ To get the input/output schema of a specific tool, use the `tool-io-schema-for-marketplace-mech` command. You need to specify the unique identifier of the tool.
264
+
275
265
  ```bash
276
- +--------------+--------------------+--------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------+
277
- | AI agent Id | Mech Type | Mech Address | Total Deliveries | Metadata Link |
278
- +==============+====================+============================================+====================+===============================================================================================================+
279
- | 2182 | Fixed Price Native | 0xc05e7412439bd7e91730a6880e18d5d5873f632c | 41246 | https://gateway.autonolas.tech/ipfs/f01701220157d3b106831e2713b86af1b52af76a3ef28c52ae0853e9638180902ebee41d4 |
280
- +--------------+--------------------+--------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------+
281
- | 2235 | Fixed Price Native | 0xb3c6319962484602b00d5587e965946890b82101 | 10127 | https://gateway.autonolas.tech/ipfs/f01701220157d3b106831e2713b86af1b52af76a3ef28c52ae0853e9638180902ebee41d4 |
282
- +--------------+--------------------+--------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------+
283
- | 2198 | Fixed Price Native | 0x601024e27f1c67b28209e24272ced8a31fc8151f | 5714 | https://gateway.autonolas.tech/ipfs/f01701220157d3b106831e2713b86af1b52af76a3ef28c52ae0853e9638180902ebee41d4 |
284
- +--------------+--------------------+--------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------+
285
- | 1722 | Fixed Price Token | 0x13f36b1a516290b7563b1de574a02ebeb48926a1 | 399 | https://gateway.autonolas.tech/ipfs/f01701220157d3b106831e2713b86af1b52af76a3ef28c52ae0853e9638180902ebee41d4 |
286
- +--------------+--------------------+--------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------+
287
- | 2135 | Fixed Price Native | 0xbead38e4c4777341bb3fd44e8cd4d1ba1a7ad9d7 | 353 | https://gateway.autonolas.tech/ipfs/f01701220157d3b106831e2713b86af1b52af76a3ef28c52ae0853e9638180902ebee41d4 |
288
- +--------------+--------------------+--------------------------------------------+--------------------+---------------------------------------------------------------------------------------------------------------+
266
+ mechx tool-io-schema-for-marketplace-mech <unique_identifier> --chain-config <chain_config>
267
+ ```
268
+
269
+ Example usage:
270
+
271
+ ```bash
272
+ mechx tool-io-schema-for-marketplace-mech 1722-openai-gpt-4 --chain-config gnosis
273
+ ```
274
+
275
+ You will see an output like this:
276
+
277
+ ```bash
278
+ Tool Details:
279
+ Tool Details:
280
+ +------------------------+---------------------------------------------+
281
+ | Tool Name | Tool Description |
282
+ +========================+=============================================+
283
+ | OpenAI Request (GPT-4) | Performs a request to OpenAI's GPT-4 model. |
284
+ +------------------------+---------------------------------------------+
285
+ Input Schema:
286
+ +-------------+-----------------------------------------------+
287
+ | Field | Value |
288
+ +=============+===============================================+
289
+ | type | text |
290
+ +-------------+-----------------------------------------------+
291
+ | description | The request to relay to OpenAI's GPT-4 model. |
292
+ +-------------+-----------------------------------------------+
293
+ Output Schema:
294
+ +-----------+---------+-----------------------------------+
295
+ | Field | Type | Description |
296
+ +===========+=========+===================================+
297
+ | requestId | integer | Unique identifier for the request |
298
+ +-----------+---------+-----------------------------------+
299
+ | result | string | Response from OpenAI |
300
+ +-----------+---------+-----------------------------------+
301
+ | prompt | string | User prompt to send to OpenAI |
302
+ +-----------+---------+-----------------------------------+
303
+ ```
304
+
305
+ ### Set up the EOA and private key
306
+
307
+ To use the Mech Client using client mode, you need an EOA account and its associated private key stored in a text file `ethereum_private_key.txt`. You can set it up in two ways:
308
+
309
+ - Use any software of your choice (e.g., [Metamask](https://metamask.io/)) and copy the private key:
310
+
311
+ ```bash
312
+ echo -n YOUR_PRIVATE_KEY > ethereum_private_key.txt
313
+ ```
314
+
315
+ Do not include any leading or trailing spaces, tabs or newlines, or any other character in the file `ethereum_private_key.txt`.
316
+
317
+ - Alternatively, use the Open AEA command `generate-key` (you'll need to install [Open AEA](https://pypi.org/project/open-aea/) and its [Ethereum ledger plugin](https://pypi.org/project/open-aea-ledger-ethereum/)):
318
+
319
+ ```bash
320
+ aea generate-key ethereum
321
+ ```
322
+
323
+ and display the corresponding EOA:
324
+
325
+ ```bash
326
+ python -c "from web3 import Web3; print(Web3().eth.account.from_key(open('ethereum_private_key.txt').read()).address)"
327
+ ```
328
+
329
+ The EOA you use must have enough funds to pay for the Mech requests, or alternatively, use a Nevermined subscription.
330
+
331
+ > **:warning: Warning** <br />
332
+ >
333
+ > - **If the generated EOA account is for development purposes, make sure it does not contain large amounts of funds.**
334
+ >
335
+ > - **If you store the key file in a local Git repository, we recommend that you add it to `.gitignore` in order to avoid publishing it unintentionally:**
336
+ >
337
+ > ```bash
338
+ > echo ethereum_private_key.txt >> .gitignore
339
+ > ```
340
+
341
+ To use client-mode for cli commands, simply supply `--client-mode` flag before the cli commands.
342
+
343
+ ```bash
344
+ mechx --client-mode <rest of the cli command>
345
+ ```
346
+
347
+ ## Legacy Mechs
348
+
349
+ #### Select the mech you are going to send requests to
350
+
351
+ Legacy Mechs are deployed on several networks. Find the list of supported networks and corresponding mech addresses, you can find more available Mechs [here](https://marketplace.olas.network/gnosis/ai-agents?legacy=true) (click on the tab "Legacy Mech" in order to see Legacy Mech (available only on Gnosis) and "Mech Marketplace" for the ones which receive requests via the Mech Marketplace).
352
+
353
+ #### Legacy Mechs
354
+
355
+ The basic usage of the Mech Client is as follows:
356
+
357
+ ```bash
358
+ mechx interact --prompts <prompt> --tools <tool> --agent_id <agent_id>
289
359
  ```
290
360
 
361
+ where agent blueprint with `<agent_id>` will process `<prompt>` with the `<tool>` and default options. Each chain has its own set of Mech agents. You can find the agent blueprint IDs for each chain on the [Mech Hub](https://aimechs.autonolas.network/registry) or on the [Mech repository](https://github.com/valory-xyz/mech?tab=readme-ov-file#examples-of-deployed-mechs).
362
+
363
+ ⚠️ Batch requests and tools are not supported for legacy mechs
364
+
365
+ Some useful options:
366
+
367
+ - `--key <private_key_path>`: Specifies the path of the private key. The default value is `./ethereum_private_key.txt`.
368
+ - `--tools <name>`: Name of the tool to process the prompt. If you are aware about the tools that are provided by an agent you can directly provide its name using this option. If not provided, it will show a list of available tools for the agent so that you can select which one you want to use:
369
+
370
+ ```text
371
+ Select prompting tool
372
+ |--------------------------------------------------|
373
+ | ID | Tool |
374
+ |--------------------------------------------------|
375
+ | 0 | openai-text-davinci-002 |
376
+ | ...| ... |
377
+ |--------------------------------------------------|
378
+ Tool ID >
379
+ ```
380
+
381
+ - `--chain-config <name>`: Use default chain configuration parameters (RPC, WSS, ...). [See below](#chain-configuration) for more details. Available values are
382
+
383
+ - `arbitrum`
384
+ - `base`
385
+ - `celo`
386
+ - `gnosis` (Default)
387
+ - `optimism`
388
+ - `polygon`
389
+
390
+ - `--confirm <type>`: Specify how to wait for the result of your request:
391
+ - `off-chain`: Wait for the result using the ACN.
392
+ - `on-chain`: Wait for the result using the Subgraph and the Websocket subscription (whichever arrives first).
393
+ - `wait-for-both` (Default): Wait for the result using both `off-chain` and `on-chain` (whichever arrives first).
394
+
395
+ ##### Example
396
+
397
+ Example of a request specifying a key file and tool:
398
+
399
+ ```bash
400
+ mechx interact --prompts "write a short poem" --agent_id 6 --key ~/ethereum_private_key.txt --tools openai-gpt-3.5-turbo --chain-config gnosis --confirm on-chain
401
+ ```
402
+
403
+ You will see an output like this:
404
+
405
+ ```bash
406
+ Chain configuration: gnosis
407
+ Prompt uploaded: https://gateway.autonolas.tech/ipfs/f01701220af9e4e8b4bd62d76394064f493081917bcc0b9c34a4aff60f82623b717617279
408
+ Transaction sent: https://gnosisscan.io/tx/0x61359f9cc6a1debb07d34ce1038f6aa30d25257c17edeb2b161741805e43e8d0
409
+ Waiting for transaction receipt...
410
+ Created on-chain request with ID 100407405856633966395081711430940962809568685031934329025999216833965518452765
411
+ Data arrived: https://gateway.autonolas.tech/ipfs/f01701220a462120d5bb03f406fa5ef3573df77184a20ab6343d7bade76bd321654aa7251
412
+ Data from agent: {'requestId': 100407405856633966395081711430940962809568685031934329025999216833965518452765, 'result': "In a world of chaos and strife,\nThere's beauty in the simplest of life.\nA gentle breeze whispers through the trees,\nAnd birds sing melodies with ease.\n\nThe sun sets in a fiery hue,\nPainting the sky in shades of blue.\nStars twinkle in the darkness above,\nGuiding us with their light and love.\n\nSo take a moment to pause and see,\nThe wonders of this world so free.\nEmbrace the joy that each day brings,\nAnd let your heart soar on gentle wings.", 'prompt': 'write a short poem', 'cost_dict': {}, 'metadata': {'model': None, 'tool': 'openai-gpt-3.5-turbo'}}
413
+ ```
414
+
415
+ You can use the option `--key <private_key_file_path>` in order to customize the path to the private key file.
416
+
291
417
  ### List tools available for legacy mechs and marketplace mechs
292
418
 
293
419
  #### For legacy mechs
420
+
294
421
  To list the tools available for a specific agent or for all agents, use the `tools-for-agents` command. You can specify an agent blueprint ID to get tools for a specific agent, or omit it to list tools for all agents.
295
422
 
296
423
  ```bash
297
424
  mechx tools-for-agents
298
425
  ```
426
+
299
427
  ```bash
300
428
  You will see an output like this:
301
429
  +------------+---------------------------------------------+-----------------------------------------------+
@@ -314,10 +442,13 @@ You will see an output like this:
314
442
  ```bash
315
443
  mechx tools-for-agents --agent-id "agent_id"
316
444
  ```
317
- Eaxmple usage
445
+
446
+ Example usage
447
+
318
448
  ```bash
319
449
  mechx tools-for-agents --agent-id 6
320
450
  ```
451
+
321
452
  ```bash
322
453
  You will see an output like this:
323
454
  +---------------------------------------------+-----------------------------------------------+
@@ -331,64 +462,29 @@ You will see an output like this:
331
462
  +---------------------------------------------+-----------------------------------------------+
332
463
  ```
333
464
 
334
- #### For marketplace mechs
335
- To list the tools available for a specific marketplace mech, use the `tools-for-marketplace-mech` command. You can specify an AI agent ID to get tools for a specific mech.
336
-
337
- ```bash
338
- mechx tools-for-marketplace-mech 1722 --chain-config gnosis
339
- ```
340
- ```bash
341
- You will see an output like this:
342
- +---------------------------------------------+-----------------------------------------------+
343
- | Tool Name | Unique Identifier |
344
- +=============================================+===============================================+
345
- | claude-prediction-offline | 1722-claude-prediction-offline |
346
- +---------------------------------------------+-----------------------------------------------+
347
- | claude-prediction-online | 1722-claude-prediction-online |
348
- +---------------------------------------------+-----------------------------------------------+
349
- | deepmind-optimization | 1722-deepmind-optimization |
350
- +---------------------------------------------+-----------------------------------------------+
351
- ```
352
-
353
465
  ### Get Tool Description
354
466
 
355
- #### For legacy mechs
356
467
  To get the description of a specific tool, use the `tool-description` command. You need to specify the unique identifier of the tool.
357
468
 
358
469
  ```bash
359
470
  mechx tool-description <unique_identifier> --chain-config <chain_config>
360
471
  ```
472
+
361
473
  Example usage:
362
474
 
363
475
  ```bash
364
476
  mechx tool-description "6-claude-prediction-offline" --chain-config gnosis
365
477
  ```
366
- You will see an output like this:
367
- ```bash
368
- Description for tool 6-claude-prediction-offline: Makes a prediction using Claude
369
- ```
370
-
371
- #### For marketplace mechs
372
- To get the description of a specific tool, use the ` tool-description-for-marketplace-mech` command. You need to specify the unique identifier of the tool.
373
-
374
- ```bash
375
- mechx tool-description-for-marketplace-mech <unique_identifier> --chain-config <chain_config>
376
- ```
377
- Example usage:
378
478
 
379
- ```bash
380
- mechx tool-description-for-marketplace-mech 1722-openai-gpt-4 --chain-config gnosis
381
- ```
382
479
  You will see an output like this:
480
+
383
481
  ```bash
384
- Description for tool 1722-openai-gpt-4: Performs a request to OpenAI's GPT-4 model.
482
+ Description for tool 6-claude-prediction-offline: Makes a prediction using Claude
385
483
  ```
386
484
 
387
-
388
485
  ### Get Tool Input/Output Schema
389
486
 
390
- #### For legacy mechs
391
- To get the input/output schema of a specific tool, use the `tool_io_schema` command. You need to specify the unique identifier of the tool.
487
+ To get the input/output schema of a specific tool, use the `tool-io-schema` command. You need to specify the unique identifier of the tool.
392
488
 
393
489
  ```bash
394
490
  mechx tool-io-schema <unique_identifier> --chain-config <chain_config>
@@ -399,7 +495,9 @@ Example usage:
399
495
  ```bash
400
496
  mechx tool-io-schema "6-prediction-offline" --chain-config gnosis
401
497
  ```
498
+
402
499
  You will see an output like this:
500
+
403
501
  ```bash
404
502
  Tool Details:
405
503
  +---------------------------+-----------------------------------------------+
@@ -427,49 +525,7 @@ Output Schema:
427
525
  +-----------+---------+-----------------------------------------------+
428
526
  ```
429
527
 
430
- #### For marketplace mechs
431
- To get the input/output schema of a specific tool, use the `tool-io-schema-for-marketplace-mech` command. You need to specify the unique identifier of the tool.
432
-
433
- ```bash
434
- mechx tool-io-schema-for-marketplace-mech <unique_identifier> --chain-config <chain_config>
435
- ```
436
-
437
- Example usage:
438
-
439
- ```bash
440
- mechx tool-io-schema-for-marketplace-mech 1722-openai-gpt-4 --chain-config gnosis
441
- ```
442
- You will see an output like this:
443
- ```bash
444
- Tool Details:
445
- Tool Details:
446
- +------------------------+---------------------------------------------+
447
- | Tool Name | Tool Description |
448
- +========================+=============================================+
449
- | OpenAI Request (GPT-4) | Performs a request to OpenAI's GPT-4 model. |
450
- +------------------------+---------------------------------------------+
451
- Input Schema:
452
- +-------------+-----------------------------------------------+
453
- | Field | Value |
454
- +=============+===============================================+
455
- | type | text |
456
- +-------------+-----------------------------------------------+
457
- | description | The request to relay to OpenAI's GPT-4 model. |
458
- +-------------+-----------------------------------------------+
459
- Output Schema:
460
- +-----------+---------+-----------------------------------+
461
- | Field | Type | Description |
462
- +===========+=========+===================================+
463
- | requestId | integer | Unique identifier for the request |
464
- +-----------+---------+-----------------------------------+
465
- | result | string | Response from OpenAI |
466
- +-----------+---------+-----------------------------------+
467
- | prompt | string | User prompt to send to OpenAI |
468
- +-----------+---------+-----------------------------------+
469
- ```
470
-
471
- > **:pencil2: Note** <br />
472
- > **If you encounter an "Out of gas" error when executing the Mech Client, you will need to increase the gas limit, e.g.,**
528
+ > **:pencil2: Note** <br /> > **If you encounter an "Out of gas" error when executing the Mech Client, you will need to increase the gas limit, e.g.,**
473
529
  >
474
530
  > ```bash
475
531
  > export MECHX_GAS_LIMIT=200000
@@ -477,8 +533,6 @@ Output Schema:
477
533
 
478
534
  ### Chain configuration
479
535
 
480
- #### For legacy Mechs
481
-
482
536
  Default configurations for different chains are stored in the file [configs/mechs.json](./mech_client/configs/mechs.json). If `--chain-config` parameter is not specified, the Mech Client will choose the first configuration on the JSON.
483
537
 
484
538
  Additionally, you can override any configuration parameter by exporting any of the following environment variables: