banner
genkaim

genkaim

Darkmode,yes \q(≧▽≦q) 主题来自@birdgg

Integrate an AI robot (Chatgpt) into a blog and read blog articles.

cover
View Original Article

Background#

I came across endercat's article here and got the idea to add a chatbot to my blog. However, I wanted it to be in the form of a floating window, so I searched everywhere and finally!!! I found it.
Actually, I'm just not skilled enough to add a floating window.

😆Creating a New Bot#

This time, we will be using the Chat Thing website, which supports gpt-3 for the free version.

  1. Register and log in after entering the website, and you will see the dashboard.
  2. Create a bot, but note that the free version only allows you to create one bot.
  3. Set up the basic information for the bot, and pay attention to the place to put the API key in the Advanced settings at the bottom.

image-20230809203623323

🫤Setting Data Source#

Note that the free version only allows one data source, but usually that's enough.

image-20230809214044613

There are many different ways to do this, and here are two methods:

  1. Website: (Because sitemaps can be used) Enter the website URL as shown in the image.
image-20230809204349728
  1. RSS Subscription: Click on the RSS button on your xlog homepage, copy the URL of the newly opened webpage, and paste it in the corresponding location in the image below.

    image-20230810085810825

image-20230810085956865

Remember to save and synchronize the data source.

image-20230810090147307

Now, the data source is set up.

🥰Embedding the Bot into the Blog#

Click on Embed Bot and refer to the translation in the image below. Choose the desired method of insertion.

image-20230809204552761

If you want to insert it into an article/page, it's very simple. Just insert the code you see into the corresponding .md file.

If you want a global widget, simply include it at the bottom:

<script src="https://chatthing.ai/chat-widget.js" type="text/javascript" id="<replace with the id you see in the widget code (keep the quotation marks)>" async defer></script>

The effects are shown in the images below.

image-20230809210531921 image-20230809205358309

And that's it! 🥳

If there are any errors or improvements, please let me know. 🥲

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.