Test ChatGPT for tutorial writing
Introduction
As ChatGPT is currently everywhere, I wanted to test it out and see how it works. I also wanted to see if it can be used to write tutorials. So I decided to write this tutorial using ChatGPT. I will explain how I did it and what I think about it.
So what I basically wanted to see is if it can write me a tutorial which lists all the steps I need to do to create a Teams bot. I also wanted to see if it can write the code for me. So I decided to use Yo Teams as a starting point. Yo Teams is a Yeoman generator for creating Microsoft Teams apps. It can be used to create a new Teams app project with all the necessary files and configurations. It can also be used to create a new bot project with all the necessary files and configurations. So I thought it would be a good starting point for my tutorial.
The input
The instruction I gave to ChatGPT was the following: write a step by step tutorial on building a chatbot using yo teams
And this was the outcome:
The result
-
Install Node.js and npm on your computer if you don’t have them already. Yo Teams is built on top of Yeoman, a scaffolding tool for web development projects that runs on Node.js.
-
Install Yo Teams globally by running the following command in your terminal:
npm install -g yo @microsoft/generator-teams
This will install Yo Teams and its dependencies on your system.
-
Create a new directory for your project and navigate to it in your terminal.
-
Run the Yo Teams generator by typing the following command:
yo teams
This will launch the Yo Teams wizard, which will guide you through the process of creating a new Teams project.
-
Select the “Bot” option from the wizard menu. This will create a new bot project template with all the necessary files and configurations.
-
Follow the prompts to enter your bot’s display name, description, and other details.
-
Choose the language you want to use for your bot. Yo Teams supports several popular programming languages, including TypeScript, JavaScript, and C#.
-
Choose the messaging extension option if you want to create a bot that can be used as a messaging extension within Teams. This allows users to interact with your bot in the context of a chat conversation.
-
Choose the authentication option that best suits your needs. Yo Teams supports several authentication providers, including Azure Active Directory and Bot Framework Authentication.
-
Once you have completed the prompts, Yo Teams will generate a new bot project for you with all the necessary files and configurations.
-
Open the project in your preferred code editor and navigate to the “bot.ts” file. This is where you will write the code for your bot.
-
Write your bot’s logic using the Bot Framework SDK. The Bot Framework SDK provides a set of libraries and tools for building bots that can interact with users through text messages, voice commands, and other channels.
-
Test your bot locally by running the following command in your terminal:
npm start
This will start your bot on your local machine, allowing you to test its functionality in a Teams conversation.
- Once you are satisfied with your bot’s functionality, deploy it to the Teams platform using the following command:
npm run build
This will build your bot project and create a package that can be uploaded to the Teams App Store.
- Upload your bot package to the Teams App Store and make it available to your users. That’s it! With these steps, you should now have a fully functional chatbot that can interact with users in Teams.
The conclusion
As you can see it got me a pretty solid tutorial even on the first attempt for a tool which is not that famous as others might be. The only real error I could detect was line number 8 where it should speak about the bot part as we are building a bot and not a messaging extension. But I think it is a pretty good result for a first attempt. I think it can be used to write tutorials and it can be used to write code. I think it is a good tool to have in your toolbox. I will definitely use it in the future.