From the course: OpenAI API for Python Developers
Introduction to conversational AI
- [Instructor] Chatbots are often used for online services and customer supports to offer automated services, answer general inquiries, and help customers navigate a website, and also help customers find responses to their queries. With the rise of AI over the years, AI agents take it a step further. There are now capable of making predictions, make decisions, and take actions without any supervision in order to provide valuable information and respond to user queries based on the given context and the user inputs. In 2022, we discovered ChatGPT, a multitask chatbot with capabilities extended beyond the simple query handling. ChatGPT provides a more sophisticated and interactive user experience driven by AI. So you can ask ChatGPT about any task that you want to achieve, like drafting an email, translating a document, generating code snippets to name a few. And the most striking feature about ChatGPT is its ability to generate human-like conversations. For example, I'm going to ask a simple query like, how to build a chatbot in Python. So now we're going to see the chatbot ChatGPT in action answering our query. Alright, so this was quick and helpful, so now we have a basic example. And so ChatGPT was capable of generating a detailed answer with an example with a code snippet based on a simple text input in natural language. So in this module, we also see a practical example of how to build our own AI-powered conversational agent, a bit similar to ChatGPT. So the step will be to set up the project, create a virtual environment. We're going to also install the packages. And we must also remember to set up an API key, which is required to make API calls and be authorized to generate chat completions. And finally, be able to make the conversation with AI. So the chat completion API is the same that powers the ChatGPT application. In order to generate a completion that takes a list of messages as an input right here, and we're going to use also this language model, which is GPT-3.5 Turbo at the time that you watch this video. And finally, it's going to return an output with the response from the chatbots. And so this example will give us a clear understanding of the underlying concepts and technologies behind ChatGPT and other applications also powered by the GPT models.
Contents
-
-
-
-
-
Introduction to conversational AI2m 26s
-
Project setup and overview3m 11s
-
Authentication and configuration2m 38s
-
Define a system message with instructions2m 11s
-
Making requests and generating chat completions6m 6s
-
Challenge: Create a funny chatbot2m 11s
-
Solution: Create a funny chatbot - part 14m 26s
-
Solution: Create a funny chatbot - part 24m 51s
-
-
-
-
-