Develop Real World Web Applications with ChatGPT API!
ai generated

Develop Real World Web Applications with ChatGPT API!

Part One

This knowledge piece is composed of four sections of Assumptions and Audiences, Set up the Environment and Permission (api key), A Basic Understanding of ChatGPT API Capabilities and Make Them Work (Develop Web Applications - Sample by Sample). It's intended to maximize your learning of ChatGPT API and increase your earning power as a programmer and for tech-savvy executives for digging deeper.

Assumptions and Audiences

You're a software programmer that wants to learn how to leverage ChatGPT API's power to beef up your skills. You are tech savvy, not afraid to roll up sleeves to dig into code to gain more insights.

Set up the Environment and Permission (api key)

Let's get started. Essentially we need to do three things.

  1. ChatGPT Account
  2. Generate your own unique api key
  3. Save this key to a file (important)

1. ChatGPT Account

Say, you don't have an account yet. Go to this URL, https://beta.openai.com/signup. Sign up screen may look like below:

Complete the sign up process.

2.Generate your own unique api key

Once you log in, look at the left panel and look for the [API keys] button.

Click on the [API keys] button,

Provide your phone number for the system to verify you. Once you entered your phone number and verification code, you'll ready to create new secret key.

Give it whatever name you like. Now, the next step is Important.

3. Save this key to a file (important)

Copy the key and save it to a file, again this is important because we'll need it.

Ok, now we're ready to roll!

A Basic Understanding of ChatGPT API Capabilities

We need to know what ChatGPT API can do for us. At its core, ChatGPT is the product of Natural Language Processing (NLP), which has two major components of Natural Language Understanding (NLU) and Natural Language Generation (NLG). When we enter a prompt, and the chatgpt understands what we want, that's the NLU part and when it sends us its response, the response is created or generated with NLG. Chatgpt-3.5 being the main modal (and now we have chatgpt 4 modal as well), then, of course, when it comes to image generation, another modal, “DALL-E” comes in and for text to speech, “TTS” kicks in and so on.

Now, let's expand on that.

ChatGPT API Capabilities and Description

Creativity

Such as like poems, jokes, musical pieces, story-telling, social media writing etc.

Knowledge

In the form of Q & A, virtually any subject matter.

Assistant

Such as summarization, language translation etc.

Image Generation

Text to Speech

Competent IT Worker

{for this, I'll share with you in my training materials in Part Two}

Make Them Work (Develop Web Applications - Sample by Sample)

Our very first web application based on ChatGPT API.

And let's call it “Magic”. Here's how its web interface may look like:

Magic

Now, let's enter something like this to it:

How can one improve his general intelligence?

And see the following screen for what we get:

Business/Use Cases

This application leverages ChatGPT's Knowledge capability. Which means that wherever knowledge serves a purpose a new application can be developed to serve such a purpose. For instance, for e-learning, you not only want to teach pupils or students how to learn but more importantly to help them learn a particular subject matter more effectively. And to encourage such learning or even better, make it fun, you may reward the learner with a mood enhancing joke if the students learns a particular unit well. ChatGPT's Creativity capability enables that.

Next, with ChatGPT's Knowledge capability, one may develop an experimental tele-healthcare application to help patients, also make sure you have a medical professional to work with you to ensure medical advice generated by ChatGPT would be accurate because we never want to put any patient into jeopardy.

Additional business applications...

Did someone say, “A picture is worth a thousand words”?

Let's now use ChatGPT API to generate some image for us for our second ChatGTP API based web application. And let's call it “Beautiful You!”.

Beautiful You!

Here's how the web interface may look like:

Next, let's ask it to generate an image for us.

How about “a happy family on a beach in Florida”?

Now, we get this amazing image!


Business Cases

Marketers

In the content generation world, especially for marketers, after they create some marketing content, they would want to have some images to visualize the content for more eye-catching presentation or to convey their marketing message more visually with a relevant image, and instead of explaining the entire marketing piece to a graphics designer, he or she could simply have the ChatGPT API -base image generation application to generate relevant image to reflect the content, and then pass it on to a graphic artist or designer to further polish it or create a new one.

Additional business applications...

Ok, we've covered text and image, all textual and visual stuff so far, how about audio? For instance, when your eyes get tired, you simply want to listen instead of reading?

So, let's try text to speech, our third ChatGPT API based web application. And let's call it.

Listen to My Heart...

Our web interface may look like this:


Now, what to say, how about?

"Sunshine hugs, laughter waves, and joy high-fives! Today's vibe: pure happiness! “

Look what we got and look at the bottom of the screenshot:

The audio file automatically starts to play (read out the text for us). How nice when you simply want to listen instead of reading!

Business/Use Cases

The ChatGPT's Text-to-speech Capability can allow you to develop applications to solve many business problems. For instance, for e-learning, you could easily turn an e-book into an audio book with this capability.

And many more...

Now, try to develop each of the above three web applications, and if you're still struggling or just want to speed up learning, simply reach out to me (lichunshen84 at gmail dot com) to buy my detailed training materials with complete source code and more business use cases (Part Two). It would save you headache and hassle, and likely give you more earning opportunities or enhance your capability. Also, click on the [LIKE] button and feel free to share if the article has benefited you.

Future Topic: automation, integration and customization.

Kevin Ortiz (He/Him)

Talent Specialist and Future Web Developer

10 个月

This is such a great post! Here are some lessons I have learned from building an AI-powered app that uses the currently available ChatGPT APIs: At the time of this writing, GPT-4 is the strongest model that is offered, but the cost of usage is 10 times more than GPT3.5-turbo. Another factor to consider is the level of “intelligence” you require. GPT-4 is superior in tasks of reasoning and comprehension, which could be non-negotiable aspects of the application you’re building. In my experience, GPT3.5-turbo is not always great when it comes to following instructions. For example, I use prompts that request results to be formatted in a certain way. But every once in a while, I’ll get a result that doesn’t follow the request. This can become problematic when you want the output to be formatted in a certain way for computational processing. In this article: https://www.scalablepath.com/machine-learning/chatgpt-api-app-building my colleague Engin Arslan, shares how you can use the ChatGPT API to build an app, I highly recommend it if you are interested in learning more about this topic.

要查看或添加评论,请登录

Don 春沈 Li 李的更多文章

社区洞察

其他会员也浏览了