Integrating ChatGPT’s Noteable Plugin with Chainbase API
2023-08-23 21:26
Chainbase
2023-08-23 21:26
订阅此专栏
收藏此文章
0823_1_bde36639f5.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20230823%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230823T132545Z&X-Amz-Expires=3600&X-Amz-Signature=40c4d7413eeaf483a8e525c94e5019992fd498b5d220594dd6c489498301da1a&X-Amz-SignedHeaders=host&x-id=GetObject

With the continuous advancement of AI technology, the convenience of data processing and usage has been significantly enhanced. This guide aims to lead readers to explore how to leverage advanced AI tools to delve deeper into and analyze on-chain data. We will focus on how to integrate ChatGPT with Chainbase API to achieve efficient data retrieval, visualization, and in-depth analysis.

Most of you are probably familiar with ChatGPT. This technology has evolved to its 4.0 version, supporting a plethora of plugins with ever-expanding functionalities. In this guide, our spotlight will be on the Noteable plugin. Not only is Noteable a powerful tool for data processing and analysis, but its integration with ChatGPT also allows us to directly converse with AI, articulate our needs, and let AI efficiently carry out the tasks for us.

Note: You must upgrade to ChatGPT Plus to access the plugin features.

Setting Up ChatGPT’s Noteable Plugin

Without further ado, let’s dive into the hands-on section.

First and foremost, to experience the magic of the Noteable plugin, you need to activate it within ChatGPT Plus. For the specific activation steps, please refer to Get Started With the Plugin. To help you get started quickly, the link also includes practical examples of interacting with AI.

Now, we move on to the core content of this guide: how to use the Noteable plugin in ChatGPT to call the Chainbase API. You can choose to use the standard API provided by Chainbase or customize your API based on Chainbase on third-party platforms. To provide an intuitive experience, we will demonstrate using Chainbase’s basic API “Get transactions by account” as an example.

1_Integrating_Chat_GPT_s_Noteable_Plugin_with_Chainbase_API_8667956ad9.png

(API from Chainbase documents)

Integrating Chainbase API with ChatGPT

For security and privacy reasons, ChatGPT cannot directly execute code related to external API calls. However, we can leverage the Noteable plugin to create a notebook to run such code. In this case, I chose to use the Python language for the operation.

# **Get transactions by account**
import requests

url = "<https://api.chainbase.online/v1/account/txs?chain_id=1&address=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&page=1&limit=20>"

headers = {
"accept": "application/json",
"x-api-key": "demo"
}

response = requests.get(url, headers=headers)

print(response.text)

Here’s how I converse with ChatGPT to import data.

2_Integrating_Chat_GPT_s_Noteable_Plugin_with_Chainbase_API_921d5e69a5.png

Note: Noteable only accept a few language:

3_Integrating_Chat_GPT_s_Noteable_Plugin_with_Chainbase_API_adfaf054c9.png

If you input code in a language other than Python, such as Java, the result will be empty in Noteable. However, don’t worry about it, ChatGPT can assist you by converting and executing the task using Python code to fetch the data.

4_Integrating_Chat_GPT_s_Noteable_Plugin_with_Chainbase_API_98e10275e3.png

Upon opening the link, you’ll see what has been done for you in Noteable.

5_Integrating_Chat_GPT_s_Noteable_Plugin_with_Chainbase_API_37e104fbab.png

Analyzing Data with ChatGPT and Noteable

After you’ve uploaded the data, you can request ChatGPT to perform additional analysis.

For instance, you might say: ‘Could you execute a notebook to analyze the data above and provide charts and graphs as well as a description of trends and so on to help me understand what I can get from the data?’

In my experience, it not only offered data insights but also executed tasks as displayed in Noteable.

6_Integrating_Chat_GPT_s_Noteable_Plugin_with_Chainbase_API_2f18bede4b.png
7_Integrating_Chat_GPT_s_Noteable_Plugin_with_Chainbase_API_d37908b4c5.png

The graph will be updated in the Noteable you previously accessed, as shown here:

8_Integrating_Chat_GPT_s_Noteable_Plugin_with_Chainbase_API_24b32069f5.png

Naturally, you have the option to conduct more in-depth analysis or specify more detailed requests.

You can even modify the address information I provided initially and ask specific information. It’s truly intelligent!

9_Integrating_Chat_GPT_s_Noteable_Plugin_with_Chainbase_API_dbd6abb88f.png

The above are just some basic operations. Next, based on your needs, you can unleash your imagination and delve into how to leverage the Noteable plugin in ChatGPT to call APIs and conduct data analysis.

Happy coding!

About Chainbase

Chainbase is an all-in-one data infrastructure for Web3 that allows you to index, transform, and use on-chain data at scale. By leveraging enriched on-chain data and streaming computing technologies across one data infrastructure, Chainbase automates the indexing and querying of blockchain data, enabling developers to accomplish more with less effort.

Want to learn more about Chainbase?

Visit our website chainbase.com Sign up for a free account, and Check out our documentation.

WebsiteBlogTwitterDiscordLink3

The original Link:https://chainbase.com/blog/article/integrating-chat-gpt-s-noteable-plugin-with-chainbase-api

【免责声明】市场有风险,投资需谨慎。本文不构成投资建议,用户应考虑本文中的任何意见、观点或结论是否符合其特定状况。据此投资,责任自负。

Chainbase
数据请求中
查看更多

推荐专栏

数据请求中
在 App 打开