Chapter 15
Integrating with Artificial Intelligence
IN THIS CHAPTER
Tapping into free AI using an API
Creating a chatbot on your own computer
Making your own conversational chatbot
Generating AI images
As you probably know, artificial intelligence (AI) is the latest big event in tech evolution, and it’s evolving at a very fast rate. Most people interact with AI through simple chatbots, where you type a plain-English prompt into a text box and get a reply. However, you can interact with AI through Python, and that’s what this chapter is all about.
Accessing Free AI through an API
Most popular AI chatbots provide an application programming interface (API) for integration with apps. Typically, you need a paid subscription to use it. But in this chapter, I stick to free AI APIs so you can practice without paying for access.
In this first section, you develop an AI chatbot using Python and Groq (https://groq.com).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
Groq is not the same as Grok, the AI associated with X and xAI. As of ...