Using ChatGPT to interact with the Bitshares blockchain!

in BitShares2 years ago (edited)

image.png

What is ChatGPT?

It's a pretty cool language model which you can interact through a back and forth conversation where context is preserved during the chat session; you can ask it to create content, summarize content or produce code in multiple programming languages.

Check out the ChatGPT blog & sign up for ChatGPT here!

At the moment it's free during a public beta phase, however it's unlikely to remain free forever so check it out before usage is restricted!

What are its limitations?

It's trained on data scraped from the public internet up until mid/late 2021, so anything that's occurred since then (even new coding standards) won't be in its knowledge base unless explained to it during the chat session,

It would also appear that some UI glitches may be occurring in multiple query chat sessions, I was getting interesting code but the code boxes were getting cut off, so if you've been provided a large amount of generated code/content you should occasionally create a new chat session to keep things fresh.

Since it's just a language model you can converse with, it has no beliefs/opinions/thoughts, so it can't make recommendations or express preferences aside from strictly most factual recommendations. If you run into this issue it'll keep reminding you it's offline, not up to date on training, etc.

How does this relate to Bitshares?

Let's try asking it some things relating to Bitshares! Not everyone can access this service due to the mobile number requirement, so let's get to it!

First up, I asked it to compare DEX to CEX, with a bias towards DEX:

image.png

I had asked it to compare Bitshares to other blockchains, however it reminded me that complex generic comparisons of blockchain features is outwith its capabilities.

So let's see if it can pretend to be me promoting the features of the Bitshares blockchain!

image.png

It seems to have no problem doing so 😅

Now, let's try out some Bitshares blockchain code requests! Starting with getting the latest block!

image.png

Interesting, so it has been trained on the bitsharejs documentation and plausibly github repo code, cool! It even explains the code!

Let's get silly with an idea, can it make a new banana smartcoin price feed script?

image.png

Looks like it can create a fairly basic implementation of a price feed script, neat!

What about flipping a coin, and if it lands on heads it transfers a dollar to a Bitshares user?

image.png

It got everything except the asset type, it chose 1 BTS instead of $1 (Though I like this valuation!)

How about checking if HONEST.USD is currently globally settled? Easy enough

image.png

Seeking the best trading rate out and broadcasting the best possible limit order operation for my money?

image.png

Almost, it ran out of space and also some of the asset references don't seem correct, however it's certainly almost entirely functional code (aside from being cut off..)


So.. what do you think of ChatGPT? Will you use it? Have you used it? Got any ideas for additional bitshares related examples?

Comment below!

Sort:  

so far what i've seen this thing do is like a google search on super drugs ... this is another fine example! Amazing how it can pull a sample script for exact purposes so quickly. A little scary also. Skynet !

Yeah it's certainly one-upping google search responses, however the lack of monetization is probably going to end this experiment quickly..

It's pretty impressive how quickly it can throw together the correct skeleton for a bitshares node.js script, even if it needs a little bit of tweaking it's like 80% of the way there from just a sentence of text, awesome!

Trying to think of other ways this could be beneficial, or other ideas for demonstration, code/content wise.

This thing is scary useful for writing content. Not to let it write for you, but to provide a rough template full of facts you can then edit and make your own ... it's ace!

Legit, check out this post: https://hive.blog/hive-120117/@nftea.gallery/chatgpt-top-10-lists-for-multiple-bitshares-topics

It's going to be trivial to throw together large opinionated articles in the future.