coincap-hedera-agent-kit-plugin 0.1__tar.gz → 0.2__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.
- {coincap_hedera_agent_kit_plugin-0.1/src/coincap_hedera_agent_kit_plugin.egg-info → coincap_hedera_agent_kit_plugin-0.2}/PKG-INFO +1 -1
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/README.md +24 -17
- coincap_hedera_agent_kit_plugin-0.2/README.rst +7 -0
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/setup.py +1 -1
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2/src/coincap_hedera_agent_kit_plugin.egg-info}/PKG-INFO +1 -1
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/src/coincap_hedera_agent_kit_plugin.egg-info/SOURCES.txt +1 -0
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/src/coincap_hedera_plugin/__init__.py +1 -1
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/src/coincap_hedera_plugin/coincap_plugin/tool.py +1 -0
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/LICENSE +0 -0
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/setup.cfg +0 -0
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/src/coincap_hedera_agent_kit_plugin.egg-info/dependency_links.txt +0 -0
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/src/coincap_hedera_agent_kit_plugin.egg-info/requires.txt +0 -0
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/src/coincap_hedera_agent_kit_plugin.egg-info/top_level.txt +0 -0
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/src/coincap_hedera_plugin/coincap_plugin/__init__.py +0 -0
- {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/src/coincap_hedera_plugin/coincap_plugin/plugin.py +0 -0
|
@@ -13,7 +13,7 @@ This plugin enables `AI agents` to interact with the CoinCap API
|
|
|
13
13
|
1.- Install the plugin
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
pip install coincap-hedera-plugin
|
|
16
|
+
pip install coincap-hedera-agent-kit-plugin
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
2.- Add your CoinCap API Bearer token in the .env file ( You get it in the CoinCap website )
|
|
@@ -25,14 +25,13 @@ COINCAP_BEARER_TOKEN=******************************
|
|
|
25
25
|
|
|
26
26
|
3.- Import the plugin code in your index.js (Hedera Agent)
|
|
27
27
|
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
import { CoinCapHederalugin } from 'coincap-hedera-plugin/plugin.js';
|
|
28
|
+
```py
|
|
29
|
+
from coincap_hedera_plugin import conincap_h_plugin
|
|
31
30
|
```
|
|
32
31
|
|
|
33
|
-
4.- Add the
|
|
32
|
+
4.- Add the plugin in the plugins secion of the agent
|
|
34
33
|
|
|
35
|
-
```
|
|
34
|
+
```py
|
|
36
35
|
const hederaAgentToolkit = new HederaLangchainToolkit({
|
|
37
36
|
client,
|
|
38
37
|
configuration: {
|
|
@@ -42,30 +41,38 @@ configuration: {
|
|
|
42
41
|
|
|
43
42
|
5.- Use a prompt to ask for you current balance and tell the agent to want it in USD currency, for example like this:
|
|
44
43
|
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
{ configurable: { thread_id: '1' } }
|
|
49
|
-
);
|
|
44
|
+
```py
|
|
45
|
+
response = await agent.ainvoke(
|
|
46
|
+
{"messages": [{"role": "user", "content": "Get my balance in HBAR and also convert it to USD please"}]},
|
|
50
47
|
```
|
|
51
48
|
|
|
52
49
|
6.- Now you can run the example agent and you should get your current HBAR balance converted to USD currency
|
|
53
50
|
|
|
54
51
|
```bash
|
|
55
|
-
|
|
52
|
+
python main.py
|
|
56
53
|
```
|
|
57
54
|
|
|
58
55
|
## Tools
|
|
59
56
|
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
```py
|
|
58
|
+
# Use the CoinCap API to get the current price in USD of one HBAR
|
|
59
|
+
def get_hbar_price_from_coincap():
|
|
63
60
|
```
|
|
64
61
|
|
|
65
|
-
## How to publish
|
|
62
|
+
## (Optional, only needed when creating your own python package) How to publish a PyPi package
|
|
66
63
|
1.- Read the [instructions](https://towardsdatascience.com/how-to-upload-your-python-package-to-pypi-de1b363a1b3/)
|
|
67
64
|
|
|
68
65
|
1.- Create the distribution package
|
|
69
66
|
```bash
|
|
70
67
|
python setup.py sdist
|
|
71
|
-
```
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
2.- Install twine
|
|
71
|
+
```bash
|
|
72
|
+
pip install twine
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
3.- Upload package
|
|
76
|
+
```bash
|
|
77
|
+
twine upload dist/*
|
|
78
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
CoinCap plugin for the Hedera Agent Kit Py
|
|
2
|
+
==========================================
|
|
3
|
+
Plugin that provides integration with the CoinCap API.
|
|
4
|
+
|
|
5
|
+
In this plugin we use CoinCap to get the current price in USD of one HBAR and combine it with the power of the Hedera Agent Kit to get your current balance of HBA in USD currency.
|
|
6
|
+
|
|
7
|
+
Please go to the `Plugin github repository <https://github.com/henrytongv/coincap-hedera-plugin-py>`_ for more details and instructions on how to use it.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|