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.
Files changed (15) hide show
  1. {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
  2. {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/README.md +24 -17
  3. coincap_hedera_agent_kit_plugin-0.2/README.rst +7 -0
  4. {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/setup.py +1 -1
  5. {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
  6. {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
  7. {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/src/coincap_hedera_plugin/__init__.py +1 -1
  8. {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/src/coincap_hedera_plugin/coincap_plugin/tool.py +1 -0
  9. {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/LICENSE +0 -0
  10. {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/setup.cfg +0 -0
  11. {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
  12. {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
  13. {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
  14. {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/src/coincap_hedera_plugin/coincap_plugin/__init__.py +0 -0
  15. {coincap_hedera_agent_kit_plugin-0.1 → coincap_hedera_agent_kit_plugin-0.2}/src/coincap_hedera_plugin/coincap_plugin/plugin.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coincap-hedera-agent-kit-plugin
3
- Version: 0.1
3
+ Version: 0.2
4
4
  Home-page: https://github.com/henrytongv/coincap-hedera-plugin-py
5
5
  Author: Henry Tong
6
6
  Author-email: taksantong@gmail.com
@@ -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-py
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
- ```js
29
- // CoinCap plugin to connect to CoinCap API
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 query and account plugins from core Hedera Agent code, and, this new plugin, in the tools secion of the agent
32
+ 4.- Add the plugin in the plugins secion of the agent
34
33
 
35
- ```js
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
- ```js
46
- const response = await agent.invoke(
47
- { messages: [{ role: 'user', content: "Get my balance in HBAR and give it to me converted to USD currency" }] },
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
- node index.js
52
+ python main.py
56
53
  ```
57
54
 
58
55
  ## Tools
59
56
 
60
- ```js
61
- // Use the CoinCap API to get the current price in USD of one HBAR
62
- function getHBARPriceInUSD()
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 the PyPi package
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.
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='coincap-hedera-agent-kit-plugin',
5
- version='0.1',
5
+ version='0.2',
6
6
  license='MIT',
7
7
  author="Henry Tong",
8
8
  author_email='taksantong@gmail.com',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coincap-hedera-agent-kit-plugin
3
- Version: 0.1
3
+ Version: 0.2
4
4
  Home-page: https://github.com/henrytongv/coincap-hedera-plugin-py
5
5
  Author: Henry Tong
6
6
  Author-email: taksantong@gmail.com
@@ -1,5 +1,6 @@
1
1
  LICENSE
2
2
  README.md
3
+ README.rst
3
4
  setup.cfg
4
5
  setup.py
5
6
  src/coincap_hedera_agent_kit_plugin.egg-info/PKG-INFO
@@ -3,7 +3,7 @@ __all__ = [
3
3
  "conincap_h_plugin_tool_names",
4
4
  ]
5
5
 
6
- from coincap_plugin import (
6
+ from coincap_hedera_plugin.coincap_plugin import (
7
7
  conincap_h_plugin,
8
8
  conincap_h_plugin_tool_names,
9
9
  )
@@ -1,6 +1,7 @@
1
1
  import requests
2
2
  import os
3
3
 
4
+ # Use the CoinCap API to get the current price in USD of one HBAR
4
5
  def get_hbar_price_from_coincap():
5
6
  headers = {
6
7
  "Authorization": f"Bearer {os.getenv("BEARER_TOKEN")}"