mech-client 0.6.0__tar.gz → 0.8.0__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.
- {mech_client-0.6.0 → mech_client-0.8.0}/PKG-INFO +90 -9
- {mech_client-0.6.0 → mech_client-0.8.0}/README.md +89 -8
- mech_client-0.8.0/mech_client/__init__.py +3 -0
- mech_client-0.8.0/mech_client/abis/ComplementaryServiceMetadata.json +185 -0
- mech_client-0.8.0/mech_client/abis/SubscriptionProvider.base.json +294 -0
- mech_client-0.8.0/mech_client/abis/SubscriptionProvider.gnosis.json +294 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/cli.py +93 -1
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/configs/mechs.json +6 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/interact.py +1 -0
- mech_client-0.8.0/mech_client/mech_marketplace_tool_management.py +223 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/pyproject.toml +1 -1
- mech_client-0.6.0/mech_client/__init__.py +0 -3
- {mech_client-0.6.0 → mech_client-0.8.0}/LICENSE +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/AgentMech.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/AgentRegistry.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/AgreementStoreManager.base.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/AgreementStoreManager.gnosis.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/BalanceTrackerFixedPriceNative.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/BalanceTrackerFixedPriceToken.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/BalanceTrackerNvmSubscriptionNative.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/BalanceTrackerNvmSubscriptionToken.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/DIDRegistry.base.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/DIDRegistry.gnosis.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/EscrowPaymentCondition.base.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/EscrowPaymentCondition.gnosis.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/IERC1155.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/IMech.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/IToken.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/LockPaymentCondition.base.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/LockPaymentCondition.gnosis.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/MechMarketplace.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/NFTSalesTemplate.base.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/NFTSalesTemplate.gnosis.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/NeverminedConfig.base.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/NeverminedConfig.gnosis.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/SubscriptionNFT.base.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/SubscriptionNFT.gnosis.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/SubscriptionToken.base.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/TransferNFTCondition.base.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/abis/TransferNFTCondition.gnosis.json +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/acn.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/fetch_ipfs_hash.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/__init__.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/README.md +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/__init__.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/acn.proto +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/acn_pb2.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/custom_types.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/dialogues.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/message.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/protocol.yaml +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/serialization.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/tests/__init__.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/tests/test_acn.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/tests/test_acn_dialogues.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn/tests/test_acn_messages.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn_data_share/README.md +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn_data_share/__init__.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn_data_share/acn_data_share.proto +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn_data_share/acn_data_share_pb2.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn_data_share/dialogues.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn_data_share/message.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn_data_share/protocol.yaml +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn_data_share/serialization.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn_data_share/tests/test_acn_data_share_dialogues.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/acn_data_share/tests/test_acn_data_share_messages.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/p2p_libp2p_client/README.md +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/p2p_libp2p_client/__init__.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/p2p_libp2p_client/connection.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/helpers/p2p_libp2p_client/connection.yaml +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/marketplace_interact.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/mech_tool_management.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/prompt_to_ipfs.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/push_to_ipfs.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/subgraph.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/to_png.py +0 -0
- {mech_client-0.6.0 → mech_client-0.8.0}/mech_client/wss.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mech-client
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: Basic client to interact with a mech
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Author: David Minarsch
|
|
@@ -116,12 +116,6 @@ The EOA you use must have enough funds to pay for the Mech requests, or alternat
|
|
|
116
116
|
> echo ethereum_private_key.txt >> .gitignore
|
|
117
117
|
> ```
|
|
118
118
|
|
|
119
|
-
### Select the mech you are going to send requests to
|
|
120
|
-
|
|
121
|
-
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_.
|
|
122
|
-
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, on Gnosis you can find more available Mechs [here](https://mech.olas.network/) (click on the tab "Legacy Mech" in order to see Legacy Mech and "Mech Marketplace" for the ones which receive requests via the Mech Marketplace).
|
|
123
|
-
|
|
124
|
-
|
|
125
119
|
### API Keys
|
|
126
120
|
|
|
127
121
|
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:
|
|
@@ -139,6 +133,11 @@ export MECHX_API_KEY=<your api key>
|
|
|
139
133
|
|
|
140
134
|
### Generate Mech requests
|
|
141
135
|
|
|
136
|
+
#### Select the mech you are going to send requests to
|
|
137
|
+
|
|
138
|
+
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_.
|
|
139
|
+
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).
|
|
140
|
+
|
|
142
141
|
#### Legacy Mechs
|
|
143
142
|
|
|
144
143
|
The basic usage of the Mech Client is as follows:
|
|
@@ -221,7 +220,10 @@ For a Mech using Nevermined subscriptions, to make requests, it is necessary to
|
|
|
221
220
|
mechx purchase-nvm-subscription --chain-config <chain_config>
|
|
222
221
|
```
|
|
223
222
|
|
|
224
|
-
|
|
223
|
+
⚠️ 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
|
|
224
|
+
```bash
|
|
225
|
+
export MECHX_CHAIN_RPC=
|
|
226
|
+
```
|
|
225
227
|
|
|
226
228
|
You can use the option `--key <private_key_file_path>` in order to customize the path to the private key file.
|
|
227
229
|
|
|
@@ -249,8 +251,9 @@ mechx interact --prompts <prompt-1> --prompts <prompt-2> --priority-mech <priori
|
|
|
249
251
|
```
|
|
250
252
|
|
|
251
253
|
|
|
252
|
-
### List tools available for
|
|
254
|
+
### List tools available for legacy mechs and marketplace mechs
|
|
253
255
|
|
|
256
|
+
#### For legacy mechs
|
|
254
257
|
To list the tools available for a specific agent or for all agents, use the `tools-for-agents` command. You can specify an agent ID to get tools for a specific agent, or omit it to list tools for all agents.
|
|
255
258
|
|
|
256
259
|
```bash
|
|
@@ -291,8 +294,28 @@ You will see an output like this:
|
|
|
291
294
|
+---------------------------------------------+-----------------------------------------------+
|
|
292
295
|
```
|
|
293
296
|
|
|
297
|
+
#### For marketplace mechs
|
|
298
|
+
To list the tools available for a specific marketplace mech, use the `tools-for-marketplace-mech` command. You can specify a service ID to get tools for a specific mech.
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
mechx tools-for-marketplace-mech 1722 --chain-config gnosis
|
|
302
|
+
```
|
|
303
|
+
```bash
|
|
304
|
+
You will see an output like this:
|
|
305
|
+
+---------------------------------------------+-----------------------------------------------+
|
|
306
|
+
| Tool Name | Unique Identifier |
|
|
307
|
+
+=============================================+===============================================+
|
|
308
|
+
| claude-prediction-offline | 1722-claude-prediction-offline |
|
|
309
|
+
+---------------------------------------------+-----------------------------------------------+
|
|
310
|
+
| claude-prediction-online | 1722-claude-prediction-online |
|
|
311
|
+
+---------------------------------------------+-----------------------------------------------+
|
|
312
|
+
| deepmind-optimization | 1722-deepmind-optimization |
|
|
313
|
+
+---------------------------------------------+-----------------------------------------------+
|
|
314
|
+
```
|
|
315
|
+
|
|
294
316
|
### Get Tool Description
|
|
295
317
|
|
|
318
|
+
#### For legacy mechs
|
|
296
319
|
To get the description of a specific tool, use the `tool-description` command. You need to specify the unique identifier of the tool.
|
|
297
320
|
|
|
298
321
|
```bash
|
|
@@ -308,9 +331,26 @@ You will see an output like this:
|
|
|
308
331
|
Description for tool 6-claude-prediction-offline: Makes a prediction using Claude
|
|
309
332
|
```
|
|
310
333
|
|
|
334
|
+
#### For marketplace mechs
|
|
335
|
+
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.
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
mechx tool-description-for-marketplace-mech <unique_identifier> --chain-config <chain_config>
|
|
339
|
+
```
|
|
340
|
+
Example usage:
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
mechx tool-description-for-marketplace-mech 1722-openai-gpt-4 --chain-config gnosis
|
|
344
|
+
```
|
|
345
|
+
You will see an output like this:
|
|
346
|
+
```bash
|
|
347
|
+
Description for tool 1722-openai-gpt-4: Performs a request to OpenAI's GPT-4 model.
|
|
348
|
+
```
|
|
349
|
+
|
|
311
350
|
|
|
312
351
|
### Get Tool Input/Output Schema
|
|
313
352
|
|
|
353
|
+
#### For legacy mechs
|
|
314
354
|
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.
|
|
315
355
|
|
|
316
356
|
```bash
|
|
@@ -350,6 +390,47 @@ Output Schema:
|
|
|
350
390
|
+-----------+---------+-----------------------------------------------+
|
|
351
391
|
```
|
|
352
392
|
|
|
393
|
+
#### For marketplace mechs
|
|
394
|
+
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.
|
|
395
|
+
|
|
396
|
+
```bash
|
|
397
|
+
mechx tool-io-schema-for-marketplace-mech <unique_identifier> --chain-config <chain_config>
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
Example usage:
|
|
401
|
+
|
|
402
|
+
```bash
|
|
403
|
+
mechx tool-io-schema-for-marketplace-mech 1722-openai-gpt-4 --chain-config gnosis
|
|
404
|
+
```
|
|
405
|
+
You will see an output like this:
|
|
406
|
+
```bash
|
|
407
|
+
Tool Details:
|
|
408
|
+
Tool Details:
|
|
409
|
+
+------------------------+---------------------------------------------+
|
|
410
|
+
| Tool Name | Tool Description |
|
|
411
|
+
+========================+=============================================+
|
|
412
|
+
| OpenAI Request (GPT-4) | Performs a request to OpenAI's GPT-4 model. |
|
|
413
|
+
+------------------------+---------------------------------------------+
|
|
414
|
+
Input Schema:
|
|
415
|
+
+-------------+-----------------------------------------------+
|
|
416
|
+
| Field | Value |
|
|
417
|
+
+=============+===============================================+
|
|
418
|
+
| type | text |
|
|
419
|
+
+-------------+-----------------------------------------------+
|
|
420
|
+
| description | The request to relay to OpenAI's GPT-4 model. |
|
|
421
|
+
+-------------+-----------------------------------------------+
|
|
422
|
+
Output Schema:
|
|
423
|
+
+-----------+---------+-----------------------------------+
|
|
424
|
+
| Field | Type | Description |
|
|
425
|
+
+===========+=========+===================================+
|
|
426
|
+
| requestId | integer | Unique identifier for the request |
|
|
427
|
+
+-----------+---------+-----------------------------------+
|
|
428
|
+
| result | string | Response from OpenAI |
|
|
429
|
+
+-----------+---------+-----------------------------------+
|
|
430
|
+
| prompt | string | User prompt to send to OpenAI |
|
|
431
|
+
+-----------+---------+-----------------------------------+
|
|
432
|
+
```
|
|
433
|
+
|
|
353
434
|
> **:pencil2: Note** <br />
|
|
354
435
|
> **If you encounter an "Out of gas" error when executing the Mech Client, you will need to increase the gas limit, e.g.,**
|
|
355
436
|
>
|
|
@@ -93,12 +93,6 @@ The EOA you use must have enough funds to pay for the Mech requests, or alternat
|
|
|
93
93
|
> echo ethereum_private_key.txt >> .gitignore
|
|
94
94
|
> ```
|
|
95
95
|
|
|
96
|
-
### Select the mech you are going to send requests to
|
|
97
|
-
|
|
98
|
-
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_.
|
|
99
|
-
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, on Gnosis you can find more available Mechs [here](https://mech.olas.network/) (click on the tab "Legacy Mech" in order to see Legacy Mech and "Mech Marketplace" for the ones which receive requests via the Mech Marketplace).
|
|
100
|
-
|
|
101
|
-
|
|
102
96
|
### API Keys
|
|
103
97
|
|
|
104
98
|
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:
|
|
@@ -116,6 +110,11 @@ export MECHX_API_KEY=<your api key>
|
|
|
116
110
|
|
|
117
111
|
### Generate Mech requests
|
|
118
112
|
|
|
113
|
+
#### Select the mech you are going to send requests to
|
|
114
|
+
|
|
115
|
+
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_.
|
|
116
|
+
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).
|
|
117
|
+
|
|
119
118
|
#### Legacy Mechs
|
|
120
119
|
|
|
121
120
|
The basic usage of the Mech Client is as follows:
|
|
@@ -198,7 +197,10 @@ For a Mech using Nevermined subscriptions, to make requests, it is necessary to
|
|
|
198
197
|
mechx purchase-nvm-subscription --chain-config <chain_config>
|
|
199
198
|
```
|
|
200
199
|
|
|
201
|
-
|
|
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
|
+
```bash
|
|
202
|
+
export MECHX_CHAIN_RPC=
|
|
203
|
+
```
|
|
202
204
|
|
|
203
205
|
You can use the option `--key <private_key_file_path>` in order to customize the path to the private key file.
|
|
204
206
|
|
|
@@ -226,8 +228,9 @@ mechx interact --prompts <prompt-1> --prompts <prompt-2> --priority-mech <priori
|
|
|
226
228
|
```
|
|
227
229
|
|
|
228
230
|
|
|
229
|
-
### List tools available for
|
|
231
|
+
### List tools available for legacy mechs and marketplace mechs
|
|
230
232
|
|
|
233
|
+
#### For legacy mechs
|
|
231
234
|
To list the tools available for a specific agent or for all agents, use the `tools-for-agents` command. You can specify an agent ID to get tools for a specific agent, or omit it to list tools for all agents.
|
|
232
235
|
|
|
233
236
|
```bash
|
|
@@ -268,8 +271,28 @@ You will see an output like this:
|
|
|
268
271
|
+---------------------------------------------+-----------------------------------------------+
|
|
269
272
|
```
|
|
270
273
|
|
|
274
|
+
#### For marketplace mechs
|
|
275
|
+
To list the tools available for a specific marketplace mech, use the `tools-for-marketplace-mech` command. You can specify a service ID to get tools for a specific mech.
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
mechx tools-for-marketplace-mech 1722 --chain-config gnosis
|
|
279
|
+
```
|
|
280
|
+
```bash
|
|
281
|
+
You will see an output like this:
|
|
282
|
+
+---------------------------------------------+-----------------------------------------------+
|
|
283
|
+
| Tool Name | Unique Identifier |
|
|
284
|
+
+=============================================+===============================================+
|
|
285
|
+
| claude-prediction-offline | 1722-claude-prediction-offline |
|
|
286
|
+
+---------------------------------------------+-----------------------------------------------+
|
|
287
|
+
| claude-prediction-online | 1722-claude-prediction-online |
|
|
288
|
+
+---------------------------------------------+-----------------------------------------------+
|
|
289
|
+
| deepmind-optimization | 1722-deepmind-optimization |
|
|
290
|
+
+---------------------------------------------+-----------------------------------------------+
|
|
291
|
+
```
|
|
292
|
+
|
|
271
293
|
### Get Tool Description
|
|
272
294
|
|
|
295
|
+
#### For legacy mechs
|
|
273
296
|
To get the description of a specific tool, use the `tool-description` command. You need to specify the unique identifier of the tool.
|
|
274
297
|
|
|
275
298
|
```bash
|
|
@@ -285,9 +308,26 @@ You will see an output like this:
|
|
|
285
308
|
Description for tool 6-claude-prediction-offline: Makes a prediction using Claude
|
|
286
309
|
```
|
|
287
310
|
|
|
311
|
+
#### For marketplace mechs
|
|
312
|
+
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.
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
mechx tool-description-for-marketplace-mech <unique_identifier> --chain-config <chain_config>
|
|
316
|
+
```
|
|
317
|
+
Example usage:
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
mechx tool-description-for-marketplace-mech 1722-openai-gpt-4 --chain-config gnosis
|
|
321
|
+
```
|
|
322
|
+
You will see an output like this:
|
|
323
|
+
```bash
|
|
324
|
+
Description for tool 1722-openai-gpt-4: Performs a request to OpenAI's GPT-4 model.
|
|
325
|
+
```
|
|
326
|
+
|
|
288
327
|
|
|
289
328
|
### Get Tool Input/Output Schema
|
|
290
329
|
|
|
330
|
+
#### For legacy mechs
|
|
291
331
|
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.
|
|
292
332
|
|
|
293
333
|
```bash
|
|
@@ -327,6 +367,47 @@ Output Schema:
|
|
|
327
367
|
+-----------+---------+-----------------------------------------------+
|
|
328
368
|
```
|
|
329
369
|
|
|
370
|
+
#### For marketplace mechs
|
|
371
|
+
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.
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
mechx tool-io-schema-for-marketplace-mech <unique_identifier> --chain-config <chain_config>
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
Example usage:
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
mechx tool-io-schema-for-marketplace-mech 1722-openai-gpt-4 --chain-config gnosis
|
|
381
|
+
```
|
|
382
|
+
You will see an output like this:
|
|
383
|
+
```bash
|
|
384
|
+
Tool Details:
|
|
385
|
+
Tool Details:
|
|
386
|
+
+------------------------+---------------------------------------------+
|
|
387
|
+
| Tool Name | Tool Description |
|
|
388
|
+
+========================+=============================================+
|
|
389
|
+
| OpenAI Request (GPT-4) | Performs a request to OpenAI's GPT-4 model. |
|
|
390
|
+
+------------------------+---------------------------------------------+
|
|
391
|
+
Input Schema:
|
|
392
|
+
+-------------+-----------------------------------------------+
|
|
393
|
+
| Field | Value |
|
|
394
|
+
+=============+===============================================+
|
|
395
|
+
| type | text |
|
|
396
|
+
+-------------+-----------------------------------------------+
|
|
397
|
+
| description | The request to relay to OpenAI's GPT-4 model. |
|
|
398
|
+
+-------------+-----------------------------------------------+
|
|
399
|
+
Output Schema:
|
|
400
|
+
+-----------+---------+-----------------------------------+
|
|
401
|
+
| Field | Type | Description |
|
|
402
|
+
+===========+=========+===================================+
|
|
403
|
+
| requestId | integer | Unique identifier for the request |
|
|
404
|
+
+-----------+---------+-----------------------------------+
|
|
405
|
+
| result | string | Response from OpenAI |
|
|
406
|
+
+-----------+---------+-----------------------------------+
|
|
407
|
+
| prompt | string | User prompt to send to OpenAI |
|
|
408
|
+
+-----------+---------+-----------------------------------+
|
|
409
|
+
```
|
|
410
|
+
|
|
330
411
|
> **:pencil2: Note** <br />
|
|
331
412
|
> **If you encounter an "Out of gas" error when executing the Mech Client, you will need to increase the gas limit, e.g.,**
|
|
332
413
|
>
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [
|
|
4
|
+
{
|
|
5
|
+
"internalType": "address",
|
|
6
|
+
"name": "_serviceRegistry",
|
|
7
|
+
"type": "address"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"stateMutability": "nonpayable",
|
|
11
|
+
"type": "constructor"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"inputs": [],
|
|
15
|
+
"name": "ReentrancyGuard",
|
|
16
|
+
"type": "error"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"inputs": [
|
|
20
|
+
{
|
|
21
|
+
"internalType": "address",
|
|
22
|
+
"name": "account",
|
|
23
|
+
"type": "address"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"name": "UnauthorizedAccount",
|
|
27
|
+
"type": "error"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"inputs": [],
|
|
31
|
+
"name": "ZeroAddress",
|
|
32
|
+
"type": "error"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"anonymous": false,
|
|
36
|
+
"inputs": [
|
|
37
|
+
{
|
|
38
|
+
"indexed": true,
|
|
39
|
+
"internalType": "uint256",
|
|
40
|
+
"name": "serviceId",
|
|
41
|
+
"type": "uint256"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"indexed": true,
|
|
45
|
+
"internalType": "bytes32",
|
|
46
|
+
"name": "hash",
|
|
47
|
+
"type": "bytes32"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"name": "ComplementaryMetadataUpdated",
|
|
51
|
+
"type": "event"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"inputs": [],
|
|
55
|
+
"name": "CID_PREFIX",
|
|
56
|
+
"outputs": [
|
|
57
|
+
{
|
|
58
|
+
"internalType": "string",
|
|
59
|
+
"name": "",
|
|
60
|
+
"type": "string"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"stateMutability": "view",
|
|
64
|
+
"type": "function"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"inputs": [],
|
|
68
|
+
"name": "VERSION",
|
|
69
|
+
"outputs": [
|
|
70
|
+
{
|
|
71
|
+
"internalType": "string",
|
|
72
|
+
"name": "",
|
|
73
|
+
"type": "string"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"stateMutability": "view",
|
|
77
|
+
"type": "function"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"inputs": [],
|
|
81
|
+
"name": "baseURI",
|
|
82
|
+
"outputs": [
|
|
83
|
+
{
|
|
84
|
+
"internalType": "string",
|
|
85
|
+
"name": "",
|
|
86
|
+
"type": "string"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"stateMutability": "view",
|
|
90
|
+
"type": "function"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"inputs": [
|
|
94
|
+
{
|
|
95
|
+
"internalType": "uint256",
|
|
96
|
+
"name": "serviceId",
|
|
97
|
+
"type": "uint256"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"internalType": "bytes32",
|
|
101
|
+
"name": "hash",
|
|
102
|
+
"type": "bytes32"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"name": "changeHash",
|
|
106
|
+
"outputs": [],
|
|
107
|
+
"stateMutability": "nonpayable",
|
|
108
|
+
"type": "function"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"inputs": [
|
|
112
|
+
{
|
|
113
|
+
"internalType": "address",
|
|
114
|
+
"name": "account",
|
|
115
|
+
"type": "address"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"internalType": "uint256",
|
|
119
|
+
"name": "serviceId",
|
|
120
|
+
"type": "uint256"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"name": "isAbleChangeHash",
|
|
124
|
+
"outputs": [
|
|
125
|
+
{
|
|
126
|
+
"internalType": "bool",
|
|
127
|
+
"name": "",
|
|
128
|
+
"type": "bool"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"stateMutability": "view",
|
|
132
|
+
"type": "function"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"inputs": [
|
|
136
|
+
{
|
|
137
|
+
"internalType": "uint256",
|
|
138
|
+
"name": "",
|
|
139
|
+
"type": "uint256"
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"name": "mapServiceHashes",
|
|
143
|
+
"outputs": [
|
|
144
|
+
{
|
|
145
|
+
"internalType": "bytes32",
|
|
146
|
+
"name": "",
|
|
147
|
+
"type": "bytes32"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"stateMutability": "view",
|
|
151
|
+
"type": "function"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"inputs": [],
|
|
155
|
+
"name": "serviceRegistry",
|
|
156
|
+
"outputs": [
|
|
157
|
+
{
|
|
158
|
+
"internalType": "address",
|
|
159
|
+
"name": "",
|
|
160
|
+
"type": "address"
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
"stateMutability": "view",
|
|
164
|
+
"type": "function"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"inputs": [
|
|
168
|
+
{
|
|
169
|
+
"internalType": "uint256",
|
|
170
|
+
"name": "serviceId",
|
|
171
|
+
"type": "uint256"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"name": "tokenURI",
|
|
175
|
+
"outputs": [
|
|
176
|
+
{
|
|
177
|
+
"internalType": "string",
|
|
178
|
+
"name": "",
|
|
179
|
+
"type": "string"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"stateMutability": "view",
|
|
183
|
+
"type": "function"
|
|
184
|
+
}
|
|
185
|
+
]
|