Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building AI Applications with ChatGPT APIs

You're reading from   Building AI Applications with ChatGPT APIs Master ChatGPT, Whisper, and DALL-E APIs by building ten innovative AI projects

Arrow left icon
Product type Paperback
Published in Sep 2023
Publisher
ISBN-13 9781805127567
Length 258 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Martin Yanev Martin Yanev
Author Profile Icon Martin Yanev
Martin Yanev
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Part 1:Getting Started with OpenAI APIs
2. Chapter 1: Beginning with the ChatGPT API for NLP Tasks FREE CHAPTER 3. Chapter 2: Building a ChatGPT Clone 4. Part 2: Building Web Applications with the ChatGPT API
5. Chapter 3: Creating and Deploying an AI Code Bug Fixing SaaS Application Using Flask 6. Chapter 4: Integrating the Code Bug Fixer Application with a Payment Service 7. Chapter 5: Quiz Generation App with ChatGPT and Django 8. Part 3: The ChatGPT, DALL-E, and Whisper APIs for Desktop Apps Development
9. Chapter 6: Language Translation Desktop App with the ChatGPT API and Microsoft Word 10. Chapter 7: Building an Outlook Email Reply Generator 11. Chapter 8: Essay Generation Tool with PyQt and the ChatGPT API 12. Chapter 9: Integrating ChatGPT and DALL-E API: Build End-to-End PowerPoint Presentation Generator 13. Chapter 10: Speech Recognition and Text-to-Speech with the Whisper API 14. Part 4:Advanced Concepts for Powering ChatGPT Apps
15. Chapter 11: Choosing the Right ChatGPT API Model 16. Chapter 12: Fine-Tuning ChatGPT to Create Unique API Models 17. Index 18. Other Books You May Enjoy

Summary

In this chapter, you learned how to build a desktop application with PyQt and enhance its functionality by integrating the ChatGPT API for essay generation. We discussed the basics of PyQt and its advantages over other Python GUI development tools. We used that framework to create the application’s GUI components, such as windows, labels, input fields, text areas, and buttons.

The chapter also delved into the implementation of the essay generation functionality using the ChatGPT API. The main method discussed was generate_essay(), which took the user’s chosen topic, set the engine type, created a prompt using the topic, and sent a request to the API to generate the essay. The generated essay was then displayed in the application’s output area. You also learned how to build the save_essay() function, which used the docx library to save the generated essay as a Word document.

Furthermore, the chapter explored how to enhance the application by allowing...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime